Rockbox mail archiveSubject: Re: Random numbers et al
Re: Random numbers et al
From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Sun, 06 Apr 2003 17:49:32 +0200
Blue Chip wrote:
> # As people have not adhered to a single source code layout, would it be
> worth considering the use of a beautifier to standardise everything?
Our coding guidelines don't forbid different layouts. We feel that we
have better things to do than trying to make the code look uniform. We
have a few guidelines, but not many about formatting.
> # The random number generator appears to be a horribly complex and
> memory hungry block of code - is there any reason why this monstrous
> algorithm was chosen over the classic "X <- (aX + c) mod m"?
Yes, we wanted a very good random number generator.
> If not, please say and I will forward my random number class (2 minutes
> to convert back to C again) and documentation (including biblio) to some
> relevant person. The memory, codespace and execution time could ALL be
> greatly improved by this change.
Yes, we would maybe save 2-3kbytes. I'm not sure that the execution
speed gain would be noticeable at all.
> # Would anybody entertain a rewrite of the core libs (memset/strcpy/etc)
> in assembler - it appears that this would make a notable difference to
> the speed of the codebase? Plus ASM is my language of choice.
We want as little assembler as possible. And I'm not sure that you would
gain that much execution speed anyway. We would rather want easily
Received on 2003-04-06