News for hackers. Stuff that matters.
Re:Nim vs Rust Benchmarks by samwillis on Monday February 07, 2022 @07:52AM (#30244119)
Quite true, although my (possibly naive) assumption was that with it being a statically typed language and these being "simple" algorithmic benchmarks the gap would be closer.

Not expecting it to match Rust or C in performance, just surprised at the size of the gap.

Would be interesting to see what the generated C is like from the Nim code.

Re:Nim vs Rust Benchmarks by MisterTea on Monday February 07, 2022 @08:46AM (#30244733)
> Would be interesting to see what the generated C is like from the Nim code.

Just did a few quick tests. A hello world in nim is a one liner:

  echo "hello world"
It compiles to a 102136 byte binary on Linux. A hello world c program consisting of a single printf is 16696 bytes.
Re:Nim vs Rust Benchmarks by shirleyquirk on Monday February 07, 2022 @09:21AM (#30245184)
https://hookrace.net/blog/nim-binary-size/ gets hello world to parity(17k) with `-d:release --opt:size` and `strip`, and then shows how to get that down to 150 bytes.
Re:Nim vs Rust Benchmarks by xigoi on Monday February 07, 2022 @12:43PM (#30248245)
Did you compile it in release mode?