Hacker News new | ask | show | jobs
by garethrowlands 2071 days ago
If Rust does more inlining than Haskell, it does _a lot_ of inlining! Haskell doesn't monomorphise (it calls it specialise) much by default though.
1 comments

FWIW, that is mostly gut feeling, I don't have good data on that. I probably should have softened that sentence. And it's not really that Haskell is missing some sort of optimization here, it's that these things all tie together: Rust tends to monomorphize a lot, which produces more code in general, including stuff to get inlined. It's one of the big challenges to get things to compile quickly; they're sort of inherently in tension with one another.