Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

61
High-Performance Haskell?
Post Body

What are the secrets to high performance Haskell? I've met people who claim that Haskell code should perform around 5-10x slower than C, Tikhon Jelvis says that mildly optimized Haskell can perform around 3x C in time, kuribas claims that Haskell should perform at least at 50% of C, an acquaintance can get Haskell to half of Rust's performance, and there's libraries like Attoparsec and Streamly that claim 80-90% of C performance. And of course, there's Don Stewart.

What's the secret to getting high performance Haskell? Are the ultra-fast libraries concurrency scams (i.e, C is single-threaded, Haskell is parallel)? Or are the ultra-fast libraries actually as fast as they claim, and that it's possible to get Haskell to near-C speeds?

Because I love Haskell as a fun toying-around language, given how concise the language (and functional style) can be. Especially when you have defections to the Rust camp, keeping Haskell performant is a worthy goal, and I guess high-performance Haskell is joked about as "only if you're Don Stewart" or "dark magic, summoned by sacrificing puppies and kittens".

Any tips, links, advice to get ultra-high-performance Haskell, other than, perhaps, inline-C? ;)

Comments

In most cases you're going to give up the beauty and conciseness that make Haskell a draw in the first place.. In general it may be worth doing for commonly used libraries (as long as you don't leak the optimization ugliness into your abstraction), but any constant factor optimization is unlikely to be worthwhile for application code.

Author
Account Strength
90%
Account Age
8 years
Verified Email
Yes
Verified Flair
No
Total Karma
3,657
Link Karma
1,036
Comment Karma
2,540
Profile updated: 1 week ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago