46 ms·
There is nothing about zero const abstractions in this article, just basic compiler optimizations.
by tiziano88 7y ago
There is nothing about zero const abstractions in this article, just basic compiler optimizations.
- kibwen 7y agoThe OP doesn't explicitly demonstrate any zero cost abstractions, however these "basic compiler optimizations" are only feasible to achieve statically (i.e. without a JIT) in the presence of sufficiently transparent abstractions, which takes a good deal of language design effort to enable.
- Ericson2314 7y agoWell, functions are abstractions too, but yes to me the interesting part of "zero const abstraction" is "zero cost data structure composition", and that indeed is not covered.
- danieldk 7y agoIterators in Rust are (usually) zero-cost abstractions of loops. Bjarne Stroustrup's definition: What you don’t use, you don’t pay for. And further: What you do use, you couldn’t hand code any better. Rust iterators fit in the second part.