Robin Gareus
8f333acb80
marginal improvement on x86_64 for zero, 5-10% for tiny numbers; 100% time improvement (half the time) on i686 with zero. #/bin/sh g++ -x c++ -O3 -ffast-math -o /tmp/a.out - << EOF #include <stdio.h> #include <stdlib.h> #include <cmath> #include <limits> static inline float accurate_coefficient_to_dB (float coeff) { #if 1 // try me if (coeff < 1e-15) return -std::numeric_limits<float>::infinity(); #endif return 20.0f * log10f (coeff); } int main (int argc, char **argv) { long long int i; float f = 0; if (argc < 3) return -1; long long int end = atoll (argv[1]); for (i = 0; i < end; ++i) { f += accurate_coefficient_to_dB (atof (argv[2])); } printf ("%f\n",f); return 0; } EOF time /tmp/a.out 100000000000 0.0 time /tmp/a.out 100000000000 0.0 time /tmp/a.out 100000000000 0.0 |
||
---|---|---|
cfgtool | ||
doc | ||
export | ||
gtk2_ardour | ||
headless | ||
icons | ||
libs | ||
mcp | ||
midi_maps | ||
msvc_extra_headers | ||
MSVCardour3 | ||
MSVCMixbus3 | ||
MSVCvst_scan | ||
patches | ||
patchfiles | ||
templates | ||
tools | ||
vst | ||
.dir-locals.el | ||
.gitignore | ||
ardour-3.ttl | ||
ardour.1 | ||
ardour.1.es | ||
ardour.1.fr | ||
ardour.1.ru | ||
ardour.dox | ||
COPYING | ||
instant.xml | ||
instant.xml.sae | ||
Makefile | ||
msvc32-fixup.pl | ||
PACKAGER_README | ||
README | ||
system_config | ||
testfile.flac | ||
testfile.ogg | ||
TRANSLATORS | ||
waf | ||
wscript |
Please see the Ardour web site at http://ardour.org/ for all documentation.. For information on building ardour: http://ardour.org/development.html