Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Haskell is generally regarded as being slow compared to other similarly high level languages. It's focus isn't performance as much as it is safety and surety. It's like without the crabs.
-
kiki352474y@SortOfTested I know you can’t really say “slow” or “fast” and it depends but Haskell is darn fast, much faster than python under any circumstances
-
@uyouthe
Python is pretty slow in general. It has fast startup time, and that's about it.
Haskell vs ocaml or f#, the latter two usually win.
I love haskell, it's just middle of the pack in terms of perf. -
Oh yeah, it's a heck of a lot faster than most people realise. (Not as fast as C though.) A lot of it has to do with the fact the GC can be stupidly quick and deterministic because of the guarantees you can make about short lived evaluations in a purely functional environment. That's not an advantage you can really leverage as much with the less pure functional langs like OCaml, Scala, Clojure etc.
The real disadvantage is that, despite the noise functional people make to the contrary, pure functional isn't suitable for everything - and Haskell doesn't really offer a "way out" of it. That being said, while that would make it wholly unsuitable for a monolith, I'm surprised it hasn't been used more in a microservice environment. -
kiki352474y@SortOfTested python has awfully slow startup time. Maybe we’re talking about different pythons somehow? 🤔
-
matt-jd10094yIs there any benchmarks to show that it performs like you described? I have only seen ones that strengthen C's case. Also wouldn't the immutable nature of haskell still make for much less performant code for some simple things mutability solves quickly and easily?
-
kiki352474y@matt-jd immutability done via persistent structures is usually much quicker than copying shit. So much quicker in fact than a clojurescript react wrapper powered by persistent data structures outperformed the react itself by a huge margin
-
matt-jd10094y@uyouthe yeah sure how does this relate to the haskell, C performance? I'm just curious if you know of any info at hand one could look at
-
matt-jd10094y@uyouthe no but you claimed that it has comparable performance and even better for larger code bases. Thus my original question was if you have seen/done any benchmarks to support it
-
Program performance depends on a lot more than just number crunching (look up a metric called arithmetic intensity for example).
Haskell is great at expressing computation logic, but where it loses to systems stuff like Rust/C/C++ is memory management and data structure control. It's also hard to optimize for caches and stuff, and Haskell code can have unexpected bottlenecks because of its complex programming and execution model. Basically, very hard to express your computation in terms of how hardware (or a higher abstraction, like concurrent processes) actually works.
In most high performance applications, managing data transfers and stuff is a much bigger bottleneck than computation.
It really depends on what you want performance for. Eg. in an Erlang application, compute is usually crap. But that's because in the kind of thing Erlang is meant for, compute isn't the bottleneck, it's more about managing data in a massively distributed system. So Erlang is "slow" in the traditional sense, but not really.
If you're talking about general performance, in my experience Haskell does about the same on average as Java.
Related Rants
-
dibbler6722Not a specifically dev related story, but absolutely rant worthy. Today I was working from home, and my wife ...
-
whatevel12So, today I was at my college library, working on an Haskell project that I have for my Functional Programming...
-
nzeetee7Well fuck me. Just went to my first meetUp with a group of Haskell programmers. I think they broke Enigma in ...
When you hear “Haskell performance”, what comes to your mind? I was never really interested in Haskell since I had Clojure, and I thought Haskell might be slow.
Haskell with GHC is actually as fast as C or even faster. Haskell runs right on your hardware, no VM or interpreter.
When a program is small, the performance is comparable to C. Sometimes it’s quicker, sometimes not. But when a program is large, Haskell implementation would be faster if you’re not a robot that generates perfect C code.
It’s both very high-order AND very fast. You don’t need math to code in Haskell.
Too bad there are no kewl libraries.
rant
haskell