With all due respect, Nim is a great language performance wise however I fail to see how is it different from D. Many advertised features have been present in D for a long time. Syntax wise Nim it is a step back. It's hard to read and understand while any C/C++ dev will have next to no effort reading through D code. And of course while D is C ABI compliant it interoperates with C++ well too. I seriously doubt that Ni…
* For a full comparison of features D vs Nim see [0], or a more succint selection of items by Nim's creator [1]; these also contains some remarks about metaprogramming and C/C++ interoperability. * syntax-wise you could also argue that is a step forward: it embraces Python syntax and it would be easy to read and understand for all Python devs. * Nim does have a "faster NumPy" by the same author of the article: [2] [0…
Ray Tracing in Nim
51–60 of 68 posts
Re: Ray Tracing in Nim
#52I keep seeing Nim and it looks really productive and very interesting! Does anyone know how it compares to Zig?
^) https://ziglang.org/#Integration-with-C-libraries-without-FF...
EDIT: replaced nasty star parsed as markup with a caret. Sorry.
Re: Ray Tracing in Nim
#53With all due respect, Nim is a great language performance wise however I fail to see how is it different from D. Many advertised features have been present in D for a long time. Syntax wise Nim it is a step back. It's hard to read and understand while any C/C++ dev will have next to no effort reading through D code. And of course while D is C ABI compliant it interoperates with C++ well too. I seriously doubt that Ni…
* For a full comparison of features D vs Nim see [0], or a more succint selection of items by Nim's creator [1]; these also contains some remarks about metaprogramming and C/C++ interoperability. * syntax-wise you could also argue that is a step forward: it embraces Python syntax and it would be easy to read and understand for all Python devs. * Nim does have a "faster NumPy" by the same author of the article: [2] [0…
D has slices, ranges and lazy evaluation which is a joy when you do data number crunching. Nim does not have them.
Also no mention of dpp in a table is surprising tbo.
D PRs take time mostly because they go through a rigorous community review. And by that I mean your PR does need to hit the quality bar. Which is only good and does not make a language a sandbox of community features like C++. See the PR for macros in D and why it didn't happen. Another reason is the lack of people of course.
Re: Ray Tracing in Nim
#54With all due respect, Nim is a great language performance wise however I fail to see how is it different from D. Many advertised features have been present in D for a long time. Syntax wise Nim it is a step back. It's hard to read and understand while any C/C++ dev will have next to no effort reading through D code. And of course while D is C ABI compliant it interoperates with C++ well too. I seriously doubt that Ni…
* For a full comparison of features D vs Nim see [0], or a more succint selection of items by Nim's creator [1]; these also contains some remarks about metaprogramming and C/C++ interoperability. * syntax-wise you could also argue that is a step forward: it embraces Python syntax and it would be easy to read and understand for all Python devs. * Nim does have a "faster NumPy" by the same author of the article: [2] [0…
Re: Ray Tracing in Nim
#55Earlier quoted context omitted.
* For a full comparison of features D vs Nim see [0], or a more succint selection of items by Nim's creator [1]; these also contains some remarks about metaprogramming and C/C++ interoperability. * syntax-wise you could also argue that is a step forward: it embraces Python syntax and it would be easy to read and understand for all Python devs. * Nim does have a "faster NumPy" by the same author of the article: [2] [0…
Thanks. So here are the points for D according to the table. Very few breaking changes because language is pretty mature. Not sure if Nim is as stable but just this one fact is enough for me personally. D has slices, ranges and lazy evaluation which is a joy when you do data number crunching. Nim does not have them. Also no mention of dpp in a table is surprising tbo. D PRs take time mostly because they go through a…
[1] https://nim-lang.org/blog/2019/09/23/version-100-released.ht...
Re: Ray Tracing in Nim
#56 g++ multi-threaded : 33.52
nim multi-threaded : 36.90
g++ single-threaded: 75.78
nim single-threaded: 75.95
nim 1.2.0, g++ 10.1.0. I used the flags -O3 -march=native -mtune=native -Wall -Werror for gcc and the default flags for nim.Re: Ray Tracing in Nim
#57What I like about Nim is that you can always get C performance if you just spend a little time. You can always use a profiler you like (I use vTune) to get to the hot loops and fix them. See my post here: https://forum.nim-lang.org/t/5363#33576
Re: Ray Tracing in Nim
#58What I like about Nim is that you can always get C performance if you just spend a little time. You can always use a profiler you like (I use vTune) to get to the hot loops and fix them. See my post here: https://forum.nim-lang.org/t/5363#33576
Does nim support SIMD intrinsics? Without those you aren't getting "C performance."
Re: Ray Tracing in Nim
#59Earlier quoted context omitted.
Is that not true of almost any other systems language (depends if you count Go as a systems language)?
Nim still Mostly retains its pythonic nature (fun and readable) even when you do whatever’s needed for C/C++ level performance. I think it’s exceptional in that it feels lightweight while delivering great performance, and it has no “glass ceiling” of any sort. Rust and D have no ceiling either; but D feels like a better C++ and Rust feels like a court filing. D is definitely under-appreciated if you prefer C feel to…
Re: Ray Tracing in Nim
#60Earlier quoted context omitted.
Yup. That's what popped up when I searched. Thanks for the reference though.
The CUDA kernels are stored here: - https://github.com/mratsim/Arraymancer/blob/master/src/tenso... With the higher order function: - https://github.com/mratsim/Arraymancer/blob/master/src/tenso... And their code generation: - https://github.com/mratsim/Arraymancer/blob/master/src/tenso... It's possible to avoid inlining C++ like they do here: - https://github.com/jcosborn/cudanim/blob/338be782/cuda.nim#L... but I wi…