Skip to content

Commit 717a301

Browse files
committed
Experiment with specialized lists
The idea is to have a compiler-specific list data type that optimizes for small lists. Where the overhead of normal lists is one Cons node per element, the overhead of `Lst` is 0 for lists of length <= 1, and 1 array node for longer lists. Furthermore, we'll try to inline heavily, which is easier for specialized data structures. The main downsides are inefficient `tail` and `::`, in particular for longer lists. Compiler code will need to be adapted to avoid these where it is performance critical. This also serves as test case for the inline related fixes in the previous commits.
1 parent 2368fb4 commit 717a301

File tree

2 files changed

+825
-0
lines changed

2 files changed

+825
-0
lines changed

0 commit comments

Comments
 (0)