TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: High-order Virtual Machine (HVM) – A Parallel Functional Runtime

150 pointsby LightMachineover 3 years ago

7 comments

LightMachineover 3 years ago
HVM is the ultimate conclusion to years of optimal evaluation research. I&#x27;ve been a great enthusiast of optimal runtimes. Until now, though, my most efficient implementation had barely passed 50 million rewrites per second. It did beat GHC in cases where optimality helped, like λ-encoded arithmetic, but in more real-world scenarios, it was still far behind. Thanks to a recent memory layout breakthrough, though, we managed to reach a peak performance of *2.5 billion* rewrites per second, on the same machine. That&#x27;s a ridiculous 50x improvement.<p>That is enough for it to enjoy roughly the same performance of GHC in normal programs, and even outperform it when automatic parallelism kicks in, if that counts! Of course, there are still cases where it will perform worse (by 2x at most usually, but remember it is a 1-month prototype versus the largest functional compiler in the world). I&#x27;m confident HVM&#x27;s current design is able to scale and become the fastest functional runtime in the world, because I believe the optimal algorithm is inherently superior.<p>I&#x27;m looking for partners! Check the notes at the end of the repository&#x27;s README if you want to get involved.
stevemk14ebrover 3 years ago
If you read the how.md it mentions the key insight was to introduce an operation into the language that allowed temporary violation of &#x27;sensical rules&#x27; that the author calls superposition. Then computing or applying one of these super imposed clones collapses down to a final result obeying the rules. Being that the lambda calculus is core to computing information, I can&#x27;t help but think, what if this is actually an insight into something profound about how our universe works?
评论 #30159217 未加载
rigilleover 3 years ago
I honestly can&#x27;t believe I&#x27;m having the chance to contribute with this right from the start
caotic123over 3 years ago
That&#x27;s so cool Victor. I will probably waste some time implementing something using your runtime. So happy to be part of this.
yewenjieover 3 years ago
I wish I could eventually use Haskell libraries with this&#x2F; Kind.
rurbanover 3 years ago
This is a piece of art. Look at the c runtime for the core.
评论 #30154636 未加载
评论 #30195868 未加载
mbrodersenover 3 years ago
Excellent work. Stuff like this is why I read HN.