Re:C++ is faster and safer than Rust (2020)
by vbezhenar on Thursday October 07, 2021 @01:54AM
(#28782625)
Optimizing integer increment might be easy. Hard thing is optimizing overloaded increment operator. ++c is naturally faster, because it does not have to make a copy of its previous value. Especially if that operator implementation is inside another library. So it makes sense to use fast-by-default approach.
[ Parent
| on HN ]
Re:C++ is faster and safer than Rust (2020)
by willbudd on Thursday October 07, 2021 @05:48AM
(#28784216)
Yeah, I should have specified that I was referring to plain-old-data types such as integers. Custom objects overloading their operators certainly allow any number of differentiated rabbit holes to be dug.