Can Haskell be as Fast as Rust?
(Compiler/PL related question)
As i can read, Haskell does very good optimizations and with its type system, i couldn’t see why it can’t be as fast as rust.
So the question is two fold, at the current state, is Haskell “faster” than rust, why or why not.
I know that languages themselves do not have a speed, and is rather what it actually turn into. So here, fast would mean, at a reasonable level of comfort in developing code in both language, which one can attain a faster implementation(subjectivity is expected)?
haskell can do mutations, but at some level it is just too hard. But at the same time, what is stopping the compiler from transforming some pure code into ones involving mutations (it does this to some already).
I am coming at this to learn compiler design understand what is hard and impractical or nuances here.
Thank you.