liquidcarrot / carrot

🥕 Evolutionary Neural Networks in JavaScript
https://liquidcarrot.io/carrot/
MIT License
296 stars 34 forks source link

Exponentiation (**) operator ~x2 faster than Math.pow() #188

Open GavinRay97 opened 5 years ago

GavinRay97 commented 5 years ago

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Exponentiation

Chrome [Version 79.0.3921.0 (Official Build) dev (64-bit)]:

mathpow-bench-chrome

Firefox Nightly [72.0a1 (2019-11-11) (64-bit)]:

math-pow-firefox

raimannma commented 5 years ago

I will use this for the new RL part.

Thanks for sharing!