??? 06/07/07 14:47 Read: times |
#140374 - Thank you, sir! Responding to: ???'s previous message |
I don't know about 'more obvious', but it's certainly cleaner, quicker, and smaller, so it's probably a fair trade. For explaining things, I suppose I could just keep the old version commented out in the source code.
Some discussion, though: division and modulus operations take a nice chunk of code, even with precompiled libraries and unsigned integers. On the other hand, said libraries will execute in constant time(O(k)), whereas looping is O(n), where n is the index given. Horses for courses, I suppose. Again, you have my gratitude. -Bob |
Topic | Author | Date |
Software design problem | 01/01/70 00:00 | |
Something like this, maybe? | 01/01/70 00:00 | |
Well, yes, actually... | 01/01/70 00:00 | |
Duhr and a question | 01/01/70 00:00 | |
Which ones did you look at ? | 01/01/70 00:00 | |
Duhr and an answer | 01/01/70 00:00 | |
Is it not possible to | 01/01/70 00:00 | |
Horses for courses | 01/01/70 00:00 | |
have fun | 01/01/70 00:00 | |
A Queue? | 01/01/70 00:00 | |
I used what I called a \'cache\' | 01/01/70 00:00 | |
Gah, code repost | 01/01/70 00:00 | |
you need to read it all, THEN process | 01/01/70 00:00 | |
Your approach is much more general... | 01/01/70 00:00 | |
Prioritizing? | 01/01/70 00:00 | |
Some suggestions Bob | 01/01/70 00:00 | |
Thank you, sir! | 01/01/70 00:00 | |
Division / modulus not always slow | 01/01/70 00:00 | |
Are we making this too difficult? | 01/01/70 00:00 | |
I don't think so, it seems to work pretty well...![]() | 01/01/70 00:00 |