Re: [AD] CPU info changes |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Henrik Stokseth wrote:
Bob <ohannessian@xxxxxxxxxx> wrote:it also makes it harder and slower to get this info. parsing a string to fetch this info is just a bad idea IMO.I don't know about you, but I tend not to fetch CPU info a few milliontimesper second :-Pit's not speed i'm converned about. this info should be easily accessible, and it is so in binary form. string parsing is *overkill*. and is really the only thing i do not like about the CPU info changes. i'd much more like to be able to use: if(cpu.family == 5) than say: if, while, strtok, strcmp and atoi, just to get the same done.
Although that's true, it's not an operation that is down very often (if even at all!). So we have a little freedom as to how to implement it. I'm not a big fan of having 200 global variables though.
In any case, this is becomming a simple matter of opinion, where there isn't really any Best Way(tm) of doing things.
[snip] -- - Robert J Ohannessian "Microsoft code is probably O(n^20)" (my CS prof) http://pages.infinit.net/voidstar/
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |