2 ms·
Indeed. But my point is that the idea that immidiately presents itself when you think "zero-cost abstraction" is wrong. >What you do use, you couldn’t hand cod
by qwertyuiop924 10y ago
Indeed. But my point is that the idea that immidiately presents itself when you think "zero-cost abstraction" is wrong.
>What you do use, you couldn’t hand code any better.
And that will never be true: if you know exactly as much about your usecase as the abstraction, than that might be possible, but that is almost never the case (which was my second point).
- steveklabnik 10y ago> And that will never be true It is often true. Higher-level Rust code can and often does compile into the same assembly (or sometimes better!) than a lower-level construct. That's the entire premise of optimizing compilers. They're not perfect, but they do achieve this goal more often than "never". See the Option comments above for one trivial example.