I think it's fine advice in some circumstances but like so much coding advice the real skill is not knowing the advice, it's knowing when to apply it.
It must be a very specific use-case, because usually I would see languages usually considered worst for performance being able to scale really, really far.
In 95% cases it's usually database being the bottleneck rather than whichever coding language you chose.
Speaking of Python, I also recently wrote a tool in Python that was getting a little slow and bloated - I rewrote it in Rust and managed to reduce the runtime by 40x and memory use by 3x. This one wasn't mission critical but you can see the scale of the issue. And no there wasn't any realistic way I could have found a hot spot and just written that part in another language. That rarely helps in my experience.
If you have the wrong algorithm your existing tests won't help much as the likely have wrong edge cases.