Eduardo wrote:
At 01:38 26/07/2006, you wrote:
Nuno Lucas wrote:
On 7/22/06, Eduardo <[EMAIL PROTECTED]> wrote:
Sorry, but i must disagree. He uses VC6, a compiler from
<snip>
you use a compiler from pre-altivec era or non altivec optimized
libraries (including libc), your code will be a lot slower.
While I agree with you on the general, I must note that would be for a
CPU-bound application. Most sqlite applications tend to be IO-bound
(unless you have enough memory and is all cached), so the differences
will not manifest so much.
I usually have enough memory ;) and must agree with your note, I/O to
disk or network is a real bottleneck. But using a better compiler which
make faster code ( or better, do the same work in less CPU cycles )
allows the principal application or other threads work faster also. So
this affect not only sqlite, but the whole app.
As an aside, there are applications that have better performance with
-Os (optimized for size) than with any -O<insert your favorite number
here>, because can incur in dramatically less cache misses (which is
several times slower than a cache hit and can also imply scheduling
decisions against the process/thread).
Regards,
~Nuno Lucas
Nuno has a very valid point that we certainly observe. Programs which
run all the time, expecially interpreters like the Sqlite engine, run
very much better when they are small so that the regularly used
components fit in the processor cache. Having compact data structures
can be a big help in keeping the working set cached.
Well, i never tried to compile optimizing size, it's very curious that
doing so we can get faster apps. Must try it.
------------------------------------------------------------
Alien.org contacted... waiting for Ripley
Your processor runs much faster than your memory, so when it has to
access from memory it has to wait. That is why it has cache, to cut
back on waits for frequently accessed items. Minimizing checkerboarding
in your programs makes for faster execution.