TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Packed Data Support in Haskell

77 点作者 matt_d大约 1 个月前

5 条评论

nine_k大约 1 个月前
&gt; <i>Introducing the ‘packed’ data format, a binary format that allows using data as it is, without the need for a deserialisation step. A notable perk of this format is that traversals on packed trees is proven to be faster than on ‘unpacked’ trees: as the fields of data structures are inlines, there are no pointer jumps, thus making the most of the L1 cache.</i><p>That is, a &quot;memory dump -&gt; zero-copy memory read&quot; of a subgraph of Haskell objects, allowing to pass such trees &#x2F; subgraphs directly over a network. Slightly reminiscent of Cap&#x27;n Proto.
评论 #43828513 未加载
评论 #43828717 未加载
评论 #43832166 未加载
评论 #43828145 未加载
tlb大约 1 个月前
&gt; the serialised version of the data is usually bigger than its in-memory representation<p>I don’t think this is common. Perhaps for arrays of floats serialized as JSON or something. But I can’t think of a case where binary serialization is bigger. Data types like maps are necessarily larger in memory to support fast lookup and mutability.
评论 #43831282 未加载
评论 #43829849 未加载
lordleft大约 1 个月前
This was very well written. Excellent article!
NetOpWibby大约 1 个月前
Is this like MessagePack for Haskell?
gitroom大约 1 个月前
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy