Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improving performance of Occ::get, adding FMIndex benchmark #74
In the process of profiling my application, I noticed quite a lot of time spent in
Bench time of map/fold on my machine:
Bench time of filter/count on my machine:
In this microbenchmark, this provides ~34% improved runtime speeds, and I've noticed a similar speedup in the benchmarks for my application.
I also tried versions with manually counting items in a loop, and while the bench time of those was consistently within the margin of error of the filter/count version, the average time across runs was just a touch higher. Looking at the disassembly, the bounds checks add a few percentage points of overhead when manually counting the items, and using unsafe