|
Rockbox mail archiveSubject: Re: Random numbers et alRe: Random numbers et al
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 6 Apr 2003 15:41:29 +0200 (CEST) On Sun, 6 Apr 2003, 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? [First let me state that these are all my personal opinions, I speak for myself.] I don't think so. We've adhered to the major things: indent level, naming styles, typedefs etc. The main thing that differ are the placement of the braces, and I don't consider that a major issue. Beautifiers always fail and make a mess. > # 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"? 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. I wouldn't say that the code space used by the current code is "memory hungry". But yes, the one you suggest (basicly the one we had before this) is smaller. This algorithm was favoured due to its ability to provide nice pseudorandom numbers. > # 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. If you can prove that such a rewrite has a significant impact on Rockbox performance, then I'm for it. Otherwise, keeping things in C is easy and readable and allows more people to understand and improve the code. I have serious doubts that your mentioned rewrites into ASM is what we need to improve Rockbox. I think that effort is better spent at improving algorithms, fixing code hickups or similar. > # How simple is it to have the Cygwin dev kit installed alongside the > standard PC cygwin install? The "one or the other" limitation could be a > problem for me :( I have no idea. Linux rocks. -- Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/Received on 2003-04-06 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |