3 ms·
Here's a java snippit that may be of interest to you [0] by a user called Riven [1]. It should be considerably faster than the lookup table with LERP (not that
by mooman219 6y ago
Here's a java snippit that may be of interest to you [0] by a user called Riven [1]. It should be considerably faster than the lookup table with LERP (not that it really matters at this point since we're just counting nanoseconds on one hand). I recall going down this rabbit hole somewhere around High School as well five or so years ago, and ended up brainstorming potential faster implementations on an old java forum with several users. I believe you have a Intel-Core-i7-8559U, which if userbenchmark is to be trusted, leads me to believe the snippit I linked should be in the 3ns range assuming a warm cache for the lut. Accuracy is configurable based on the sin bits.
[0]: https://gist.github.com/mooman219/9698a531c932c08ccefd86ba7cd4463a https://gist.github.com/mooman219/9698a531c932c08ccefd86ba7c...
[1]: https://jvm-gaming.org/u/riven/summary https://jvm-gaming.org/u/riven/summary