haskell / haskell/primitive

Consider array-doubling for fromList

Open
#101 16 comments 0 reactions 0 assignees View on GitHub
performance
Dominant language
Haskell
Stars
123
Forks
60
PR merge metrics
No merged PRs in 30d

Description

`fromList` for `Array` and `SmallArray` currently takes the length of the list before doing anything else. This isn't so great, especially if the list is long (mostly relevant for `Array`) and especially if the list is otherwise dead. I'm pretty sure that `vector` uses array doubling to implement `fromList`; perhaps we should too.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.