it sometimes does, as nim has a few top-tier libraries like arraymancer
https://github.com/mratsim/Arraymancer
But in general, naive nim 2.0 code will lose to naive c/c++ most of the time, but usually by a negligible amount. So you'll have to put in some work if you want to compete or beat.
There are some release options since nim just compiles to c.
Like using clang LTO
https://forum.nim-lang.org/t/6295
If you are a hardcore manual memory believer, you should be aware that it's highly coupled to its reference counting based memory management solution (which can be quite good sometimes)
https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html
And while you can turn it off --mm:none, in my experience, it's a second-class experience, which makes sense considering how hostile the creator is for manual memory in nim.
You should also be aware, that Nim 2 is in a sort of purgatory right now because they're in the middle of shipping Nim 3, which is a completely new compiler which makes some radical changes.
https://github.com/nim-lang/nimony
So while Nim 2 is a great language (with a fair bit of oddities), you're coming in at an awkward time, and i believe you should only use it if you're okay with automatic memory management.
If you want an alt lang with a better manual memory experience, or believe in the mixed-management strategy, i think D is a better choice, or you can try the other ones like Zig or Odin (which i have no experience with)