[flac-dev] Undefined behaviour

Erik de Castro Lopo mle+la at mega-nerd.com
Tue Sep 1 06:53:43 PDT 2015


lvqcl wrote:

> Martijn van Beurden wrote:
> 
> > I just checked on my Raspberry pi (armv6-hf, GCC 4.6) and it
> > looks like decoding is actually faster with these changes. I
> > benchmarked 1b8af6b against f7c52c8, the results are attached.
> 
> Interesting results, thanks.
> 
> 
> (OTOH, GCC 4.6 was released ~4.5 years ago, so it would be also
> interesting to test it on newer compilers - GCC 4.9.x or 5.x,
> or some new Clang...)

I've added a micro benchmark for this is in the microbench/ directory.

If you pull from git and then:

    ./autogen.sh
    ./configure
    cd microbench/
    make
    ./benchmark_residual

you will get something like this (armhf with gcc-4.9.3):

    shift order 2 : 0.000279 0.000284 0.000285 0.000525
    mult  order 2 : 0.000240 0.000242 0.000243 0.000247

    shift order 3 : 0.000408 0.000413 0.000412 0.000415
    mult  order 3 : 0.000438 0.000443 0.000443 0.000445

    shift order 4 : 0.000510 0.000512 0.000512 0.000518
    mult  order 4 : 0.000661 0.000663 0.000664 0.000669

where the times are; minimum, median, mean and maximum.

This benchmark code will probably only run on Linux. Patches
accepted to fix that.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list