nothings/stb — pull request #57 by rygorous (2014-12-14 03:40:06+00:00)
Title: Optimize

stb_image: PNG/zlib decoder optimizations.

The goal was to focus on low-complexity, high-yield changes: improve
decoding speed significantly while staying with the original spirit of
the library.

This is more than 2x faster on my machine when decoding my 1680x1050
24-bit test PNG (screenshot of a website) - very scientific, I know.
Nevertheless, there's nothing particularly data-sensitive in here. The
one thing that is specific to that particular file is that I added a
fast path for the "none" filter when img_n == out_n (i.e. just do a
memcpy). But that's such a trivial change (and likely to benefit other
files, since "none" is common) that I don't feel guilty about it.