Re:Nim 2.0 thoughts
by eikenberry on Saturday May 15, 2021 @02:50PM
(#27167840)
How is the compiler, speed wise? One thing I really like about Go and really don't like about Rust are their relative compiler speeds. I think it makes a big different for the language and Nim has a chance to get this right as they didn't make the mistake of using LLVM and it's bad compiler UX.
[ Parent
| on HN ]
Nim compiles to C and then runs GCC (not LLVM) to compile the binary. Overall, it's much faster than Go and Rust.
Re:Nim 2.0 thoughts
by isubasinghe on Saturday May 15, 2021 @07:43PM
(#27169961)
I get that Nim can be faster than Go but I don't see how it can be faster than Rust, could you please elaborate as to why?
Re:Nim 2.0 thoughts
by FridgeSeal on Saturday May 15, 2021 @09:12PM
(#27170376)
They probably mean the compilation is much faster than Rust.
I was referring to compilation time... given the question.
Is transpiled C readable?
It is. It's just not very pleasant to read due to the autogenerated variable names.
If you disable all runtime checks, like integer overflows, range checks, etc..., stack traces and debug information (-d:danger) it's readable yes.
For my small learning projects, on old hardware, I’d say about the same as Go.
Pretty good. The actual compilation is via clang, so there's a lot of heavy lifting done by that.
So basically nim actually compiles .nim -> .c -> binary