It’s very hard. I’ve found most experienced Haskell devs still get it wrong at times. It’s one of the things that makes me think that we need to rethink the overall approach to laziness
Laziness in data structures usually gives you good enough performance in most cases, but harder to make sure it's consistent and reason about when you need to adjust it. For common operations with an average requirement of performance, laziness seems to give the developer an easier chance of good performance, with the higher possibility to screw it up if the requirement is really strict.
The solution is to just not use laziness when you don't need it, then reasoning about Haskell performance is the same as in any other language.
http://h2.jaguarpaw.co.uk/posts/make-invalid-laziness-unrepr...
Perhaps, with more experience, the performance of programa targeting HVM will be predictable, but I suspect it will mean a lot of relearning intuitions about what makes programs slow?
Do Haskell programmers have good intuition about performance? It seems like laziness would make it hard?