4 ms·
This begs the question of what would be better - to compile your favorite language to C and use something like Emscripten to make JS, or to compile your code di
by Artlav 10y ago
This begs the question of what would be better - to compile your favorite language to C and use something like Emscripten to make JS, or to compile your code directly to JS?
So far as my experiments went, a 3000 native score Dhrystone test compiles to C at 1300, and that C compiles to 850 worth of JS. Which suggests that a direct-to-JS compiler might be worth the efforts...
- gokr 10y agoYou can play around with Nim for getting some numbers on this - since it can compile to C, C++ or js.