|
|
|
|
|
by tines
1969 days ago
|
|
This seems really cool, but can someone who knows both Lean and Haskell (the former is probably just a subset of the latter, lol) explain how this is materially different from a Haskell implementation of the same algorithm? I don't know where to look for the cool dependently-typed parts. |
|
The Lean runtime implements the Perseus algorithm for functional in-place updating when possible. It's a very clever reimagining of reference counting from basic principles. The loop that combines all the results from all the threads takes advantage of this and doesn't allocate intermediate arrays.