Hacker News new | past | comments | ask | show | jobs | submit login

Very cool project! I think JS is very underrated for quality games.

Another "easy" optimization opportunity: don't use .forEach() unless necessary. I noticed it was used in the benchmark.

.forEach() has the overhead of a function call on every iteration, you can't break out of the loop early if needed, and the scoping is different depending on whether or not you use a classical function or an arrow function.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: