agrafix / agrafix/superrecord

Is record creation O(n^2)?

Aperta
#14 7 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Haskell
Stelle
83
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.