Skip to content

Comment on C++ is faster and safer than Rust (2020)parent

Comments

That's what I meant with operator++ being redefined to do anything.

but when you write generic algorithms (as you should), you don't know beforehand with which "operator++" your a will be called. So you have to go for the one which will give the best performance.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.