Commit Graph

834 Commits

Author SHA1 Message Date
Samuel Berthe 1f669cbc2d perf: preallocate result slices in Difference (#830)
Difference previously initialized left and right as empty slice
literals (Slice{}), causing repeated grow-and-copy allocations
as elements were appended.

Now preallocates with make(Slice, 0, len(listN)) to avoid
unnecessary reallocations.
2026-03-05 21:15:05 +01:00
Samuel Berthe e82e7f5d7d perf: avoid double iteration in UniqMap (#829)
UniqMap previously built a map then called Keys(seen) which:
1. Iterated the map a second time to extract keys
2. Returned keys in non-deterministic map iteration order
3. Allocated a separate slice inside Keys()

Now collects results directly during the single pass, preserving
insertion order and eliminating the redundant iteration.
2026-03-05 18:53:43 +01:00
dependabot[bot] 7c2d883a34 chore(deps): bump dompurify from 3.2.7 to 3.3.2 in /docs (#828)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.7 to 3.3.2.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.7...3.3.2)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 18:53:27 +01:00
Samuel Berthe f7891eb41c perf: preallocate result slice in Reject, RejectErr, RejectMap (#827)
* perf(Reject): preallocate result slice capacity

Reject was using `Slice{}` (zero capacity) causing multiple
grow-and-copy allocations as elements were appended. Preallocate
with `make(Slice, 0, len(collection))` to eliminate regrowth.

benchstat (strings_1000): -42.96% time, -53.37% memory, -88.89% allocs

* perf(Reject): preallocate result slice in Reject, RejectErr, RejectMap

All three Reject variants were using zero-capacity slices (`Slice{}`
or `[]R{}`), causing multiple grow-and-copy allocations as elements
were appended. Preallocate with `make(..., 0, len(collection))` to
eliminate slice regrowth.

Reject benchstat (strings_1000): -42.96% time, -53.37% memory, -88.89% allocs
RejectErr benchstat (strings_1000): -45.11% time, -53.37% memory, -88.89% allocs
RejectMap benchstat (strings_1000): -47.63% time, -53.37% memory, -88.89% allocs
2026-03-05 18:12:24 +01:00
dependabot[bot] e9058fd5e5 chore(deps): bump svgo from 3.3.2 to 3.3.3 in /docs (#826)
Bumps [svgo](https://github.com/svg/svgo) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](https://github.com/svg/svgo/compare/v3.3.2...v3.3.3)

---
updated-dependencies:
- dependency-name: svgo
  dependency-version: 3.3.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 16:44:56 +01:00
Adam Szaraniec 56ef3beaf8 feat: support for buffer iterator (#824)
* support for buffer iterator

* Code review fix

* fix: transforming the Buffer helper into a pull-based operator (it receives an iterator instead of channel)

* doc(it): adding loit.Buffer to doc

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2026-03-02 16:07:14 +01:00
Samuel Berthe 6a9f881ae1 💄 2026-03-02 16:06:51 +01:00
Samuel Berthe 7f0c2e0297 feat: adding UnzipByErrX helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe af46a13bfc feat: adding RejectErr helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 6f42e74a11 doc: improve examples 2026-03-02 16:06:51 +01:00
Samuel Berthe ff0e293ce3 feat: adding FilterErr helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 4bb58fd2c6 feat: adding RepeatByErr helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 72a33aa397 feat: adding FilterKeysErr + FilterValuesErr helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe dd1d58e324 feat: adding FindDuplicatesByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 693e1ce3a8 feat: adding FilterMapToSliceErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 7c55e5b6e3 feat: adding CrossJoinByErrX helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 8295993219 feat: adding FindErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe e94aa8d408 feat: adding ZipByErrX helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 64b0378b52 fix: fix inconsistent behavior on early return (return zero value instead of partial result) 2026-03-02 16:06:51 +01:00
Samuel Berthe fcc4f11fb5 💄 2026-03-02 16:06:51 +01:00
Samuel Berthe 5163ac211e fix: fix flaky test 2026-03-02 16:06:51 +01:00
Samuel Berthe cd78292882 💄 2026-03-02 16:06:51 +01:00
Samuel Berthe f0d6424eb0 feat: adding lots of examples of the new helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 18d953abf2 feat: adding lots of examples of the new helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 4584a0b848 feat: adding LatestByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 2e0b3a19c9 feat: adding EarliestByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 32dce47128 feat: adding MinIndexByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe bef45080d4 feat: adding MaxIndexByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 1db8f69a48 feat: adding KeyByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe fadc3aa9d5 feat: adding MaxByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 1342d124d5 feat: adding PartitionByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 1da649cc26 feat: adding WithoutByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 0950850fe2 feat: adding GroupByMapErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe c9783b717b feat: adding MinByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 75474ff444 feat: adding GroupByErr+CountByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 153f867680 feat: adding MeanByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe b0b34ffc94 feat: adding UniqByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 788fb2997c feat: adding OmitByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe e9037c6e8c feat: adding ProductByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 2fac7c49dd feat: adding PickByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 361866b4d4 feat: adding ReduceRightErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 993b074a87 feat: adding MapToSliceErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 20d76196f2 feat: adding ReduceErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 12e2b4ceb4 feat: adding SumByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe f69cbe70f1 feat: adding MapEntiesErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 75d813d292 feat: adding FlatMapErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe ec67399cd4 feat: adding MapErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe b1263d4a41 feat: adding MapValuesErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe d4146ceb18 feat: adding MapKeysErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 14fff24f53 doc: fix simd doc 2026-02-28 16:11:07 +01:00