Lazy ST vs concurrency

David Feuer david at well-typed.com
Mon Jan 30 19:29:10 UTC 2017


On Monday, January 30, 2017 1:50:29 PM EST Reid Barton wrote:
> I wrote a lazy ST microbenchmark (http://lpaste.net/351799) that uses
> nothing but lazy ST monad operations in the inner loop.

This benchmark doesn't really look like code I'd expect people to use in 
practice. Normally, they're using lazy ST because they actually need to use 
STRefs or STArrays in the loop! I suspect your test case is likely about the 
worst possible slowdown for the fix. And 3x slowdown in lazy ST doesn't 
necessarily translate to a 3x slowdown in an application using it.

David


More information about the ghc-devs mailing list