I notice Heap.Tail does a lot of work. The documentation says insert adds items in sorted order, so I would assume Tail should be fast. The following shows 100_000 calls to uncons.
Looks like it will take some time to learn the implementation enough to speed it up, but I'll take a stab if no one want to look at it.
I notice Heap.Tail does a lot of work. The documentation says
insert
adds items in sorted order, so I would assume Tail should be fast. The following shows 100_000 calls to uncons.Looks like it will take some time to learn the implementation enough to speed it up, but I'll take a stab if no one want to look at it.