5 ms·
GHC Haskell offers in-source rewrite rules, which can be used to get this sort of deforestation optimisation: https://wiki.haskell.org/GHC/Using_rules https://w
by dbaupp 8y ago
GHC Haskell offers in-source rewrite rules, which can be used to get this sort of deforestation optimisation: https://wiki.haskell.org/GHC/Using_rules https://wiki.haskell.org/GHC/Using_rules
Rust iterators (including the parallel ones in the Rayon library) and C++ ranges are explicitly lazy without being connected to some in-memory structure and so "automatically" have this optimisation (different to Haskell's [a] list type).