Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* In `LimitedSet` and `LimitedMap` use new optimized code for `std::less` and make that the default. * Update format * Fix comment * Implement separate benchmark for limited_set (tests limited_ordered). * Add `LimitedOptionsFlag::kNoOptimizeIndexOf` (disallows unrolling, etc). * The benchmark tests all versions. * The normal set test is expanded to verify all versions. * Further optimizations for `index_of`. * Extend unrolling to 32 cases (might need to be even 34). * Explain unlikely cases in compiler-hints. Performance analysis on a x86_64 system shows better or same performance for `LimitedSet` compared to `std::set`. This has to be further analyzed and tweaked. * Improve benhchmark * In `LimitedSet` and `LimitedMap` use new optimized code for `std::less` and make that the default. * Fix comment * Implement separate benchmark for limited_set (tests limited_ordered). * Add `LimitedOptionsFlag::kNoOptimizeIndexOf` (disallows unrolling, etc). * The benchmark tests all versions. * The normal set test is expanded to verify all versions. * Further optimizations for `index_of`. * Extend unrolling to 32 cases (might need to be even 34). * Explain unlikely cases in compiler-hints. Performance analysis on a x86_64 system shows better or same performance for `LimitedSet` compared to `std::set`. This has to be further analyzed and tweaked. * Add missing private marker * Mark benchmark as manual * Test iterator difference * A few more micro optimizations: * Mark additional wrapper functions as force inline * Provide additional branch guidance * Fix after sync. * Optimize according to performance measurements: * By default do not optimize past loop-unroll. * Change loop unroll to 24. * Add missing new line * Cleanup and move LimitedOrdered unrolling config into separate file. That file should be configurable outside - maybe via a bazel flag, maybe by generating the file, possibly a configuration. * Added custom bazel flag `--//mbo/container:limited_ordered_max_unroll_capacity=N`. * Add explanation to static_assert. * Add bzl library `//mbo/container:limited_ordered_config_bzl`.
- Loading branch information