[flac-dev] x86-64 support and SSE intrinscis code

lvqcl lvqcl.mail at gmail.com
Thu Sep 12 11:05:51 PDT 2013


I try to make my code more clean and have a few questions:

1. GCC related: MinGW contains cpuid.h header file that defines __get_cpuid()
function. Is it standard? Or is it better to use inline asm to get cpuid info?

2. Is it good idea to do mаnual loop unrolling?
Unrolling FLAC__lpc_compute_autocorrelation_intrin_sse_lag_NN gives +2% speed
increase for flac -8 and +5% for flac -5. But it's true only for MSVS compiles.
When I use Intel C compiler the difference is very small: 0.1% for 'flac -8'
and 0.5% for 'flac -5'.

3. How to properly compile functions that use different SSE versions? It seems
that a proper way is to create several units of translation and put all functions
that use SSE1 to one .c file, all functions that use SSE2 to another .c file,
and so on. Is it correct?


More information about the flac-dev mailing list