> Ha-ha, you caught me. I don't care about best possible performance, it's ok 
> to be 3-5 times slower than C. But multicore is kinda must nowadays.

Nim is as fast as C, this post has plenty of examples from scientific 
computing, raytracing and multithreaded runtime: 
[https://forum.nim-lang.org/t/5157#32409](https://forum.nim-lang.org/t/5157#32409).

Regarding multicore performance as shown by my experiments in [Project 
Picasso](https://github.com/nim-lang/RFCs/issues/160), nothing prevents Nim to 
reach competitive or even better performance than OpenMP or Intel TBB, but it 
still needs some refactoring to make it production ready.

Currently you can use:

  * OpenMP, via the `||` iterator
  * Nim Threads via `createThread` which are very thin wrapper on top of 
pthreads or Windows Fibers
  * Nim `threadpool` which gives you an API similar to async/await with 
spawn/`^`
  * A third-party threadpool like 
[https://github.com/yglukhov/threadpools](https://github.com/yglukhov/threadpools)



Also regarding your feedback in general, unfortunately people comes to Nim with 
very different backgrounds. Many comes from C or C++ as evidenced by the number 
of game developers. Static dispatch, stack allocation, control over memory and 
pointers are very important there.

Ultimately, the best way forward is to have a "Nim for the Typescript 
developer" wiki similar to what we have [for 
C](https://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers), or 
[Python](https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers)

Reply via email to