bjz/noise-rs — pull request #7 by rlane (2014-01-26 20:35:47+00:00)
Title: replace mul_add in lerp with separate multiply and add

Many common CPUs (like the Intel Sandy Bridge in my laptop) don't support FMA
in hardware, so LLVM emulates it in software instead. Replacing the FMA with a
multiply and add sped up my [benchmark] by 3x on OS X and 30x inside a 32-bit
Linux VM.

This has the downside of losing some precision. If that isn't acceptable then
we could make this a compile-time option.

[benchmark]: https://github.com/rlane/cubeland/blob/master/src/cubeland/terrain.rs