[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3DNow! and MMX
>But I want do it the directest way.
Why? The linux world is very easy. The OS is there to help you. Which is easier
to upgrade when processors change? One kernel file or a million applications. I
really wish people would stop thinking like they're on Windows machines. Linux
is not Windows with a different coat of paint. It's a different philosophy. One
the main features of that philosophy is to make things portable and simple.
cpuinfo will give you a benchmark of the cpu, for example, because the kernel
does one as it starts. So you don't have to do your own. Stuff like that.
>To make it clear... do you know this doesn't work or do you think so?
>I think there is nobody who did something like this. Wherever you ask,
>nobody can say: "No, you have to do that this way...".
OK Linus can tell you, if that's authoratitive enough. Or a whole bundle of
Linux people can tell you. It's no good turning up and saying "this doesn't
work" and when everyone goes "you're doing wrong" replying "but I want to do
that way."
Bloody do it that way then. Have your process segv. We'll all read /proc/cpuinfo
and have working software.
The same goes for all the people who, in this damn age, want to write
self-modifying code or to prod graphics card registers by hand or to change PCI
bus settings to squeeze some miniscule performance out of it. Linux DOES NOT
work that way.
This is why I stopped reading newsgroups, because for every person discussing
radical culling algorithms or something there were a dozen people asking if this
sequence of instructions was one or two cycles faster than this set, and these
whole flame wars would start up about people abusing the OSes.
Work /WITH/ the OS. Not against it. It's not your enemy anymore.
>Okay. How can I read the information from /proc/cpuinfo ?
fopen it and fscanf it.
Try catting it from the command line: that'll show you what's in it. It's a text
file. Read the manual pages (if there are any. Are there any? There should be.)