[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [glob2-devel] forums! nuag eplease read thx
From: |
cyrille . dunant |
Subject: |
Re: [glob2-devel] forums! nuag eplease read thx |
Date: |
Wed, 28 Dec 2005 22:44:12 +0100 |
User-agent: |
Internet Messaging Program (IMP) 3.2.8 |
> 5) Some statements he did like "it's memory optimized instead of speed
> optimized" are ... wrong ?
> Well which of these two lines is faster:
> (y << wDec | x)
> (y*w + x)
> He says the second is faster, and I don't see why, because I think it's
> either the same or the first is faster. Can someone explain me why ?
>
The first one should be faster : less micro-ops in the resulting assembly, I
would expect.
However, it might very well be that the compiler is better at optimizing the
second line... This *might* result in slightly better cache use. But as this is
a kind of optimization that is super compiler- and optimization-level-
dependant, you might as well do nothing :)
> Computer never do it the way you expect it....
Especially not when the compiler tries to be clever. Sometimes, the naive code
is better than the optimized, just because the compiler is so much better at
optimizing naive code...
CU
-- CFD
PS my message said essentially "beware compilers !"
- Re: [glob2-devel] forums! nuag eplease read thx, (continued)
- Re: [glob2-devel] forums! nuag eplease read thx, Nuage, 2005/12/18
- Re: [glob2-devel] forums! nuag eplease read thx, Munteanu Alexandru, 2005/12/18
- Re: [glob2-devel] forums! nuag eplease read thx, Nuage, 2005/12/18
- Re: [glob2-devel] forums! nuag eplease read thx, Nuage, 2005/12/28
- Re: [glob2-devel] forums! nuag eplease read thx, Munteanu Alexandru, 2005/12/28
- Re: [glob2-devel] forums! nuag eplease read thx, Kyle Lutze, 2005/12/29
- Re: [glob2-devel] forums! nuag eplease read thx, Munteanu Alexandru, 2005/12/29
- Re: [glob2-devel] forums! nuag eplease read thx,
cyrille . dunant <=
- Re: [glob2-devel] forums! nuag eplease read thx, simon schuler, 2005/12/28
- Re: [glob2-devel] forums! nuag eplease read thx, nct, 2005/12/28
- Re: [glob2-devel] forums! nuag eplease read thx, simon schuler, 2005/12/29
- Nuage plz read (was Re: [glob2-devel] forums! nuag eplease read thx), nct, 2005/12/29
- Re: Nuage plz read (was Re: [glob2-devel] forums! nuag eplease read thx), Nuage, 2005/12/29
- Re: Nuage plz read (was Re: [glob2-devel] forums! nuag eplease read thx), nct, 2005/12/29
- Re: Nuage plz read (was Re: [glob2-devel] forums! nuag eplease read thx), Nuage, 2005/12/29
- Re: [glob2-devel] forums! nuag eplease read thx, Nuage, 2005/12/29
- [glob2-devel] Simon's idea on gradiens, Nuage, 2005/12/29
- Re: [glob2-devel] Simon's idea on gradiens, simon schuler, 2005/12/30