hi,
just a few days with nim and i've been able to easily port some PIGs (Parallel Image Generation) apps from rust, performance results are impressive (20% improvement), programming is joyful, fluid and clear, also opencl interface is very intuitive also, ported some python apps,
i've added code to my github's: https://github.com/rforcen/nim
This is a good question, but the answer for such small deltas may not be related to "less work" as much as compiler/CPU variations. Unless you can really identify the extra work and why it happens/why it cannot be elided, I would not conclude much from 1.2x. Part of answering such questions should include deployment diversity.
FWIW, when I ran both, I got Nim as 1.42x faster on an i7-6700k with gcc-11. For someone else on a different CPU with different backends, the 20% might be unwound to be at parity - or the Rust might even be faster.
@dom96 - could be! Rust does have an advantage that its "platform" is LLVM IR which is lower level than C and LLVM & Rust teams even share people. A well oiled machine can compensate for the "newer compiler handicap". CPUs are complex enough that you never really know how the dice/luck is going to shake out from high level aspects alone and invested man hours do not tell the whole story.
OTOH, it seems Rust only really started with PGO literally in the past year (I wasn't sure when they would ever get around to it!) Due to its compilation model, Nim has had PGO from the start. PGO often helps Nim code by a bigger Nim-Nim delta than the "impressive" Nim-Rust 1.2x in my experience (often 1.2..1.8x - It did not make a difference here, at least for me on my CPU, and yes, PGO can actually hurt, too).
Like the PGO, it may have less than mature support in the Rust world, but -C target-cpu=native made no measurable difference to the Rust-1.53, yet -march=native made a 1.33x difference for the Nim-devel (with gc:arc, d:danger) - 1.42x vs 1.07x faster than the Rust. (My numbers are all just for the mandel component of this, btw.)
The upshot is that @rforcen may be even more impressed if he gets -march=native into his nim.cfg "*.options.speed" settings. It's worth a try, anyway, as is trying PGO on the non-mandel programs.