Re: Why does X need so much CPU power?
Wayne Gemmell <wayneg@ananzi.co.za> writes:
> Excuse my ignorance but couldn't the problem (at least in some part) lie in
> the fact that everything is coded/compiled for a 386?
See the list archives; this is practically a FAQ. The answer always
seems to be "no, except for very specialized things like linear
algebra and cryptography, and those actually do use processor-specific
optimizations".
> Surely code could at least run more efficiently with code that is
> compiled to use things like MMX, MMX2 and 3Dnow technology?
All three of those are basically the same technology, along with SSE;
it's adding a short vector unit to the normal processor path. It's
designed to help things like video work, where you have three or four
(or maybe as many as 8 or 16) sets of values that you're performing
the same computation on. I believe things like this can become
not-a-loop, and thus more efficient:
float a[4], b[4], c[4], d[4];
float alpha;
for (int i = 0; i < 4; i++)
{
c[i] = a[i] + b[i]; // vector-vector add
d[i] = c[i] * alpha; // vector-scalar multiply
}
But this isn't what run-of-the-mill code looks like; it's not going to
help things like laying out a Web page in response to parsed HTML.
--
David Maze dmaze@debian.org http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell
Reply to: