Rockbox mail archive
Subject: Re: Random numbers et al
From: Linus Nielsen Feltzing (linus_at_haxx.se)
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
Page was last modified "Jan 10 2012" The Rockbox Crew