Files
lo/it
d-enk fc6b369dd2 perf: optimize it.CountBy by removing Filter iterator chain (#813)
- Remove unnecessary Filter(collection, predicate) chain
- Use direct loop with predicate check instead
- Results: -36.68% time geomean, -100% B/op, -100% allocs/op

Benchstat results:
                      │   old.txt    │              new.txt               │
                      │    sec/op    │   sec/op     vs base               │
ItCountBy/ints_10-4     433.0n ± 23%   186.2n ± 5%  -56.99% (p=0.000 n=8)
ItCountBy/ints_100-4    2.487µ ± 27%   1.678µ ± 6%  -32.55% (p=0.000 n=8)
ItCountBy/ints_1000-4   20.16µ ±  8%   17.64µ ± 4%  -12.50% (p=0.005 n=8)
geomean                 2.790µ         1.766µ       -36.68%

                      │  old.txt   │               new.txt                │
                      │    B/op    │   B/op    vs base                    │
ItCountBy/ints_10-4     160.0 ± 0%   0.0 ± 0%  -100.00% (p=0.000 n=8)
ItCountBy/ints_100-4    160.0 ± 0%   0.0 ± 0%  -100.00% (p=0.000 n=8)
ItCountBy/ints_1000-4   160.0 ± 0%   0.0 ± 0%  -100.00% (p=0.000 n=8)

                      │  old.txt   │                new.txt                 │
                      │ allocs/op  │ allocs/op   vs base                    │
ItCountBy/ints_10-4     6.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=8)
ItCountBy/ints_100-4    6.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=8)
ItCountBy/ints_1000-4   6.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=8)
2026-02-24 20:23:49 +01:00
..
2025-10-02 19:23:16 +02:00
2026-02-16 15:42:42 +01:00
2026-02-16 15:42:42 +01:00
2025-10-12 18:24:32 +02:00
2026-02-23 20:27:51 +01:00
2025-10-12 18:24:32 +02:00