A new way for Nim to shine ? Faster than NodeJS interpreted Nim, taking advantage of declared types

2022-12-08 Thread Siltaar
Hi, I've been using Python and JavaScript extensively (during 15 years of career). I've been waiting typed script languages for a long time. I'm naive about compilation internals. * When TypeScript or Nim compiles to JavaScript, we're at most at native JavaScript speed (which is the fastest

Small Nim js fib benchmark

2022-11-16 Thread Siltaar
In my case I'm making a WebExtension, so code size is not my priority. But I would need a bleeding edge JavaScript WebExtension / `browser` API binding to actually use Nim at work. I would also argue that the main modern websites are loading megabytes of JavaScript, even just to deal with adver

Small Nim js fib benchmark

2022-11-15 Thread Siltaar
I played with `nim js` and recorded the results here : It shows that `nim js` compiled JavaScript code is as fast as native JavaScript code for this particular example. Tested on `nodejs` and `js78`. It also shows that `nim e fib.nim`