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.

Why GADTs matter for performance (2015)

83 pointsby hyperbrainer8 days ago

5 comments

cosmic_quanta5 days ago
Interesting, thanks for posting.<p>I share the author&#x27;s frustration with the lack of non-compiler-related examples of GADT uses. It seems like such a powerful idea, but I haven&#x27;t been able to get a feel for when to reach for GADTs in Haskell
评论 #43967511 未加载
评论 #43967468 未加载
rbjorklin5 days ago
Does anyone have some hard numbers on the expected performance uplift when using GADTs? Couldn&#x27;t see any mentioned in the article.
评论 #43965690 未加载
cryptonector4 days ago
What&#x27;s not clear from reading TFA is whether the compiler monomorphizes TFA&#x27;s `Compact_array` for the two special cases of it (array of bytes vs. array of anything else), but I&#x27;m assuming so. Perhaps if I was familiar with OCaml the answer would be blindingly obvious. What&#x27;s happening here is that w&#x2F; GADTs you can have a _singular_ abstraction with multiple distinct implementations for specific types and others for generic types, and you don&#x27;t have to think about it too much, except you have to remember to use these type hints in the interface definitions to get the compiler to do what you want.<p>&gt; Yaron Minsky joined Jane Street back in 2002, and claims the dubious honor of having convinced the firm to start using OCaml.<p>That&#x27;s pretty cool. And I guess Stephen Dolan ended up there due to his work on OCaml, which is pretty cool too. (I&#x27;d like to meet Stephen some day.)
hyperbrainer5 days ago
Related: <a href="https:&#x2F;&#x2F;github.com&#x2F;ocaml&#x2F;RFCs&#x2F;blob&#x2F;881b220adc1f358ab15f7743d5cd764222ab7d30&#x2F;rfcs&#x2F;unboxed-types.md">https:&#x2F;&#x2F;github.com&#x2F;ocaml&#x2F;RFCs&#x2F;blob&#x2F;881b220adc1f358ab15f7743d...</a>
goldchainposse5 days ago
I know Jane Street love OCaml, but you have to wonder how much it&#x27;s cost them in velocity and maintenance. This is a quant firm blogging about a programming language they&#x27;re the most famous user of.
评论 #43966798 未加载
评论 #43968597 未加载
评论 #43968242 未加载
评论 #43968979 未加载
评论 #43966877 未加载
评论 #43967578 未加载