Quote:
Originally Posted by H_TeXMeX_H
I'm assuming that prevents use of assembler to optimize libpng. Maybe that's reason ?
|
I'm pretty sure you have identified the reason. To be really sure, I'd need to check the source code for pnggccrd.c as well as figuring out how pnggcrd.c fits into Imagemagick.
Quote:
EDIT: No this is not the reason, I did not apply the patch and i got with Q16
|
I'm partially guessing here, but I think the assembler code is only available for 32bit x86. The patch only modified code that managed some details of the use of the asm code. I assume it covered some temporary bug (in attempting to use a nonexistent feature). In 64bit mode, apparently no one wrote the hand optimized asm code so it doesn't exist to use. The newer version of png.c specifically tests for defined(__i386__) and doesn't try to manage the asm code otherwise.
I never thought there was much hand optimized asm code in anything written for Linux. The general philosophy seems to be trust the compiler and code for portability. I guess pnggccrd is an exception.
So one more reason 32bit may be better than 64bit is someone took the time to write some hand optimized asm (of course it can go the other way as well, but probably hasn't done so much yet).
Edit: Then again, maybe I'm just confused.
My performance test from this morning didn't reproduce!
Back on the same Linux system: 3.2GHz dual core AMD, 64bit Mepis 7, ImageMagick 6.2.4 08/28/07 Q16, 64bit and 32bit builds. Same input .jpg file. Everything the same, except the results. I ran it twice each this morning with variation of under a second between the two runs. Now I ran it several times, still with variation under a second, so this isn't some random run to run variation.
This morning, 32bit was a little over 3 minutes and 64bit was a little under 4 minutes (don't have exact numbers).
Now 32bit is 155 seconds and 64bit is 125 seconds. 64 bit is faster than 32 bit, just as it was on Windows, not as you'd expect for hand optimized asm vs. c. Linux running on a 3.2GHz AMD is faster than Windows on a 2.3GHz Intel, just as I'd expect, not as I saw this morning.
So, IIUC, you are still reproducing the behavior of 32bit faster than 64bit. But I'm not.