[flac-dev] PATCH for encode.c, format_input()

lvqcl lvqcl.mail at gmail.com
Sat Feb 1 02:03:22 PST 2014


MSVS profiler shows that the encoder spends too much time inside format_input()
when the input is 24-bit. The attached patch increases encoding speed:

FLAC -5: from 27.1 to 24.2 seconds
FLAC -8: from 76.2 to 73.1 seconds
(MSVS 2010, 32-bit flac.exe, 24-bit stereo input file)

For GCC compiles the encoding speed remains the same.

I suspect that GCC is smart enough to use strict aliasing rule to
optimize the code, and MSVS doesn't even know about it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: encode.patch
Type: application/octet-stream
Size: 1414 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140201/3280af4f/attachment.obj 


More information about the flac-dev mailing list