agrafix / agrafix/superrecord

Is record creation O(n^2)?

オープン
#14 コメント 7 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Haskell
スター
83
フォーク
16
PR マージ指標
30日以内にマージされた PR はありません

説明

Unless I'm misunderstanding something, it appears that record creation is `O(n^2)` when we have all the information needed at compile time to statically allocate a `SmallMutableArray#` of known size right away and write all the elements into it, and avoid all the copying. Given one of the most appealing parts of this library is the `O(1)` field access even for large records it seems wasteful to make record creation so expensive (relatively). I'm imagining cases where I might be parsing a CSV file with millions of rows and that `O(n^2)` is going to add up quickly!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。