On 11/18/2012 07:56 PM, Pedro Lopez-Cabanillas wrote:
El Domingo, 18 de noviembre de 2012 12:51:58 David Henningsson escribió:
I'll do some experiments with it when I have some more time.
My bet is floating point exceptions.
I tried to verify this theory on my Nexus 7 device. I've tried to
compile with -ffast-math, with according to documentation should
activate flush-to-zero mode, as well as activating it explicitly with
this code:
asm(
"vmrs r10, FPSCR \n"
"orr r10, r10, #0x01000000 \n"
"vmsr FPSCR, r10 \n"
);
...but this did not give a notable performance difference.
I also compared double vs single precision floats, and singles were
somewhat faster.
My test scenario was this command line:
time fluidsynth -F /tmp/result.wav -z 4096
/usr/share/sounds/sf2/FluidR3_GM.sf2 ~/Downloads/NIGHTSIN.KAR
Doubles: 81 seconds
Singles: 65 seconds
...so about 20% faster.
I also ran it with perf. Here are the top five results:
Doubles:
31.86% 24682 fluid_rvoice_dsp_interpolate_4th_order
29.41% 22568 fluid_rvoice_buffers_mix
14.81% 11418 fluid_iir_filter_apply
9.01% 6952 fluid_revmodel_processmix
3.31% 2568 fluid_rvoice_write
Singles:
34.70% 21826 fluid_rvoice_dsp_interpolate_4th_order
24.55% 15519 fluid_rvoice_buffers_mix
15.00% 9506 fluid_iir_filter_apply
9.21% 5837 fluid_revmodel_processmix
3.76% 2297 fluid_rvoice_write
// David
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev