3 ms·
> Is there any inherent reason why you couldn't write a performant game in ClojureScript From the parent: if you want to run at a reasonable framerate you nee
by Domenic_S 14y ago
> Is there any inherent reason why you couldn't write a performant game in ClojureScript
From the parent:
if you want to run at a reasonable framerate you need to perform quite some logic in about 16 milliseconds[...] simply "iterating" over a seq made of a hundred elements in Clojure apparently takes more time than that.
- sgrove 14y agoBut that was the point - you can write it cleanly in ClojureScript, experiment, find bottlenecks, then drop down to Javascript for the tight parts, and clean it up (beautifully) with macros. There's obviously a tradeoff here with immutability/correctness/speed, but when you need to iterate over thousands (or hundreds of thousands) of items, you can get 'native' speed when you need it.
- ibdknox 14y agoFWIW, this is exactly what we did and chromashift has native JS level performance.