Skip to content

v1.0.9 - #19

Merged
koss-null merged 3 commits into
masterfrom
1.0.9
Oct 12, 2026
Merged

koss-null merged 3 commits into
masterfrom
1.0.9

Conversation

@koss-null

Copy link
Copy Markdown
Owner

HUGE PERFORMANCE BOOST: kill per-element allocation in Map (destination-pointer generator)

Internal GeneratorFn now writes into a caller-provided slot
(func(i int, dst *T) bool) instead of returning a fresh *T. Stages reuse one
scratch per worker, so Map stops allocating a heap box per element.

1M elements: Map 1,000,005 -> 6 allocs/op (96 -> 70 ms);
MapParallel 1,000,022 -> 25 allocs/op (43.5 -> 32.5 ms).

No exported signature changed. Behaviour: First/Any now return a pointer to a
copy (not into the source);

@koss-null
koss-null merged commit feb429d into master Oct 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant