Skip to content
0:00 / 0:00

#haskell#streamly#optimization

High Performance Haskell by Harendra Kumar at #FnConf18

ConfEngine

14K subscribers • 20 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Harendra Kumar

Advanced. Deep dive for people who know the field.

6.3K views7 years ago2 recommendations

Programming languagesSystems programmingHaskellPerformance and optimizationConcurrency and parallelism

Harendra Kumar explains how to write high-performance Haskell code, focusing on strictness, inlining, and optimization techniques.

Haskell can and does perform as well as C, sometimes even better. However, writing high performance software in Haskell is often challenging especially because performance is sensitive to strictness, inlining and specialization. This talk focuses on how to write high performance code using Haskell. It is derived from practical experience writing high performance Haskell libraries. We will go over some of the experiences from optimizing the "unicode-transforms" library whose performance rivals the best C library for unicode normalization. From more recent past, we will go over some learnings from optimizing and benchmarking "streamly", a high performance concurrent streaming library. We will discuss systematic approach towards performances improvement, pitfalls and the tools of the trade. Details: confengine.com/functional-conf-2018/proposal/6774/high-perfo… Conference: functionalconf.com

Why it's here

2 people recommend this

What people say. Recommended as an excellent guide to optimizing Haskell code and understanding compiler pragmas.

u/Faucelmein r/haskell • Recommends

On “Numerical benchmark where Haskell seems to significantly under perform.”

Incidentally, this talk by Harendra Kumar about high-performance Haskell is good.

u/chshershin r/haskell • Recommends

On “Should I be inlining instance implementations?”

Thank you very much for such a detailed explanation! This clarifies things a bit to me :) It's clear that efficient usage of `{-# INLINE #-}` pragmas requires more thinking... I really enjoyed this talk by /u/hk_hooda where he also talks about these pragmas: * High Performance Haskell by Harendra Kumar at #FnConf18 And I would love to see the blog post on this topic with examples and suggestions! Like a cookbook for when to use these pragmas or when not to use. I think it will help a lot of Haskell developers to write performant code. My understanding and my ad-hoc rules are the following (but I'm not sure whether they are correct): 1. It doesn't make sense to inline a recursive funct…

u/qualiaqqin r/haskell • Mentions

On “The Pain Points of Haskell: A Practical Summary”

>When building up a list, it's better non-tail recursive, since you create lazy thunks. Doesn't tail recursive have a better chance of becoming a loop in the end or something? > However for building a number having thunks is bad, so there you use tail recursion (or a strict left fold). If you do that, don't forget a strictness annotation on the state parameter! Can you give an example of "strictness annotation on the state parameter"? Are you talking about the parameter of the helper function when doing explicit recursion? Like the reverse int function below should be `go !acc !x` with bang patterns? However, marking the module Strict, which does that for me, didn't make a difference (no…