3 ms·
> Every feature of every language has some kind of performance trade off. That's simply untrue (unless meant as a pointless tautology :)). There are plenty off
by MichaelGG 12y ago
> Every feature of every language has some kind of performance trade off.
That's simply untrue (unless meant as a pointless tautology :)). There are plenty off free features and abstractions. From syntactic sugar things, to really advanced stuff like Rust's borrow checker. Even using lambdas in Rust can be cost free. (It almost seems like Rust and LLVM have created the sufficiently smart compiler.)
And even really high level languages like Haskell can do surprisingly great optimizations, so that, say, a pipeline of projections and filters costs the same as just writing the loop by hand.
For a safe array, the usually acceptable overhead is one bounds check per loop/sequence, right?
(Anyways, the article discusses non optimized builds, at which point nothing's guaranteed to be cheap, so he's really asking for more developer support tools.)