by Animats · 9y ago · 0 comments
When I first wrote that code, I was targeting 32 bit ARM, with possibly very weak floating point units. These days, on the types of chips you'd see in phones (or computers in the $9-$40 range like rpi 3), the floating point calculation is _so_ fast (especially with simd) that the cost of the memory lookup starts dominating. So, the NEON implementation computes 4 sin values in a gulp, using a floating point polynomial approximation about the same precision as above[1].
[0] https://github.com/google/music-synthesizer-for-android/blob...
[1] https://github.com/google/music-synthesizer-for-android/blob...