Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system: Provide libpng decoding benchmark #303

Open
joebonrichie opened this issue Dec 27, 2023 · 0 comments
Open

system: Provide libpng decoding benchmark #303

joebonrichie opened this issue Dec 27, 2023 · 0 comments

Comments

@joebonrichie
Copy link

joebonrichie commented Dec 27, 2023

There are two options that i know of:
https://raw.githubusercontent.com/glennrp/libpng/libpng16/contrib/examples/pngtopng.c
gcc -Ofast pngtopng.c -o pngtopng -lpng

and
https://raw.githubusercontent.com/joebonrichie/benchmarks/master/pngbench.c
gcc -Ofast pngbench.c -o pngbench -lpng

The user will need the libpng development package installed (e.g. libpng-devel) to link to a benchmark executable if applicable.

Typically testing on a large complex image such as: https://upload.wikimedia.org/wikipedia/commons/6/6a/PNG_Test.png, will produce the biggest differences.

At a system level, libpng decode performance will typically be improved from the following

  • swapping out the canonical zlib library for a faster variant e.g. zlib-ng
  • Building with --enable-hardware-optimizations=yes
  • x86_64: building with x86_64-v2 or higher (note: this will wipe out any gains from --enable-hardware-optimizations=yes)
  • Possibly building with PGO (openmadriva does it but I've been unable to replicate a speedup)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant