New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to use libjpeg-turbo( 2-4x as fast as libjpeg )?
Libjpeg-turbo declaims that it's 2-4x as fast as libjpeg, however, I replaced libjpeg with libjpeg-turbo, but there's no performance difference?
I used the "ldd" command to analyze a program, it does link to libjpeg dynamically:
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x000000327bc00000)
But whether do I replace libjpeg with libjpeg-turbo by manipulating LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib64:$LD_LIBRARY_PATH
Or link libjpeg.so.62 to libjpeg-turbo directly:
ln -s /opt/libjpeg-turbo/lib64/libjpeg.so.62.1.0 /usr/lib64/libjpeg.so.62
I can't see any performance difference, even the file size of the generated image didn't change!
Comments
you need to buy a vps first :P
IIRC most distros have already been using libjpeg-turbo by default for many years, so the libjpeg.so is actually jpeg-turbo.
Thank you! You are correct:
"Red Hat Enterprise Linux 6.4 includes a new set of packages: libjpeg-turbo. These packages replace the traditional libjpeg packages, and provide the same functionality and API as libjpeg but better performance."
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/6.4_Release_Notes/general_updates.html
So from RHEL 6.4 and CentOS 6.4, "libjpeg" is actually jpeg-turbo.