Skip to content

Conversation

@matt-attack
Copy link

@matt-attack matt-attack commented Apr 11, 2025

Note this is a draft. Was just messing around with some options.

Including rough benchmarks here. Speedups are estimated since disk caching was involved and the benchmark involved other tasks.

Benchmark was converting 5 GB pcap of a roadway drive to OSF. Standard implementation took about 38 seconds wall time. All encoders besides Zlib took about 8. So about 5x faster and many things had about 7x less CPU time overall.

Note running stats on the PCAP takes about 4 seconds by itself.

  • QOI (~5x faster 57% bigger file than libpng)
  • LZ4 (~5x faster 60% bigger file than libpng)
  • QOI + LZ4 (~5.1x faster 53% bigger file than libpng)
  • ZLib (~25% slower with slightly worse compression than libpng)
  • FPNGE, faster PNG implementation (AVX/SSE4.1 only) (~5x faster 10% bigger file than libpng)
  • ZPNG (>5x faster, 7% smaller file)

Seems like FPNGE is a good option since it is backwards compatible, though only benefits X86. Perhaps a similar ARM implementation can be found.

If we are okay with a new encoding, ZPNG so far seems like the best option. It should be much faster on all platforms and can have a better compression ratio. It also seems to decode 2x faster than libpng.

Related Issues & PRs

Summary of Changes

Validation

Including rough benchmarks here
- QOI (5x faster 57% bigger file)
- LZ4 (5x faster 60% bigger file)
- QOI + LZ4 (5.1x faster 53% bigger file)
- ZLib (20% slower than libpng with slightly worse compression)
- FPNGE (AVX/SSE4.1 only) (5x faster 10% bigger file)
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

Successfully merging this pull request may close these issues.

1 participant