SpeedTests
SpeedTests copied to clipboard
racket: optimize example
This reduces the runtime on my M2 Max from 38 seconds to about 4.8s.
Bump 👋
Hi @jabbalaci, any thoughts on getting this merged? If there's no interest, I can just close it, but I want to take it off my list of open pull requests. Thanks!
Will merge it today.
Thanks!
Thanks, it was added. If you want, you can add some explanation why it's faster. For instance, at JavaScript we have this line:
* `main2.js` is an improved implementation, using a more optimal cache array size
If you send a similar sentence, I'll update the README.
Maybe something along the lines of: the improved code uses type-specific procedures to compute the results and for the cache, thereby reducing indirection and eliding runtime safety checks that the generic math procedures perform, but that are not necessary here. Feel free to reword that in any way you like!