tweag/asterius

Make use of precomputed `Int` and `Char` closures in the runtime

开放

#331 创建于 2019年10月20日

 (2 条评论) (0 个反应) (0 位负责人)Haskell (56 个派生)batch import
P2good first issuetype: bug

仓库指标

星标
 (1,949 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

The ghc rts has precomputed Int and Char closures for small Int and Char values. When the garbage collector finds an Int or Char closure in the dynamic memory which fall into the range, the closure is replaced with a precomputed closure. This trick is based on the assumption that a lot of such closures actually contain small values, and can slightly improve the gc efficiency. We don't implement this trick for now, but it shouldn't be too hard to do so; additionally, rts_mk* functions can also return precomputed closures directly.

贡献者指南