5 ms·
I'll second this. We've had similar problems with Task<> based code in C# (futures/async) when it comes to performance analysis. I will say this only becomes
by batou 11y ago
I'll second this.
We've had similar problems with Task<> based code in C# (futures/async) when it comes to performance analysis.
I will say this only becomes apparent when you really push it hard, but we do that. Determinism is really important for predictable performance.
- codygman 11y agoTheoretically you may be right, but in practice not so much. source: I've been writing production Haskell code for a little while now and haven't had any weird performance issues yet.
- jeremyjh 11y agoLaziness doesn't take away determinism. I agree you may have some surprises but they all make sense when you understand them. I've only ever had one really baffling problem due to un-evaluated thunks building up and it did not take long to find the root of it using the profiler.
- batou 11y agoYou're right but it defers determinism until some point in the future or maybe not at all :)
- eloisant 11y agoWhat becomes non-deterministic with async is the order in which operations are executed (depending on how long the previous processes took) possibly creating race conditions that can sometimes become very hard to debug. However if you work with immutable objects like Scala or Haskell encourages you to do, this shouldn't become much a problem.