boostorg / unordered

Boost.org unordered module
http://boost.org/libs/unordered
Boost Software License 1.0
62 stars 55 forks source link

Feature/bulk visit #217

Closed joaquintides closed 11 months ago

joaquintides commented 11 months ago

Some points for discussion:

cppalliance-bot commented 11 months ago

An automated preview of the documentation is available at https://217.unordered.prtest2.cppalliance.org/libs/unordered/doc/html/unordered.html

pdimov commented 11 months ago

It might be useful for user to know whether unordered_x<...>::bulk_visit_size depends on the template parameters of the container, but I'm not quite sure how to express that.

joaquintides commented 11 months ago

Well, the fact that bulk_visit_size is a nested value of concurrent_x<...> implies that it depends on .... If we want to communicate that this is not the case, we just define it as a lobal constant ourside concurrent_x.

pdimov commented 11 months ago

Does it have to depend on them, though? Or on all of them? How would a different hash function possibly affect it?

joaquintides commented 11 months ago

Well, if we were to fine tune bulk_visit_size, it'd depend on Hash (the faster Hash, the larger bulk_visit_size ought to be) and on the CPU architecture (memory fetching time/instruction throughput). No other dependencies, really. The hot code is this:

https://github.com/boostorg/unordered/pull/217/files#diff-a299ea8b15c2c2c34afbb92c11f11dc383bb2764a341c3e145090b6df0170720R1207-R1221

Maybe all these considerations are moot, anyway, as we can always increase bulk_visit_size wholesale is there's a need: there should be no practical downside to having this constant larger than the minimum required to achieve no waiting cycles --more data stored on the stack, that's all.

codecov[bot] commented 11 months ago

Codecov Report

Merging #217 (5afa714) into develop (44b669a) will decrease coverage by 0.03%. Report is 1 commits behind head on develop. The diff coverage is 98.41%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/boostorg/unordered/pull/217/graphs/tree.svg?width=650&height=150&src=pr&token=ZqRPZlJZ5N&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg)](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ```diff @@ Coverage Diff @@ ## develop #217 +/- ## =========================================== - Coverage 98.12% 98.10% -0.03% =========================================== Files 142 143 +1 Lines 19502 20099 +597 =========================================== + Hits 19137 19718 +581 - Misses 365 381 +16 ``` | [Files](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) | Coverage Δ | | |---|---|---| | [include/boost/unordered/concurrent\_flat\_map.hpp](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC91bm9yZGVyZWQvY29uY3VycmVudF9mbGF0X21hcC5ocHA=) | `100.00% <100.00%> (ø)` | | | [include/boost/unordered/concurrent\_flat\_set.hpp](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC91bm9yZGVyZWQvY29uY3VycmVudF9mbGF0X3NldC5ocHA=) | `100.00% <100.00%> (ø)` | | | [...de/boost/unordered/detail/foa/concurrent\_table.hpp](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC91bm9yZGVyZWQvZGV0YWlsL2ZvYS9jb25jdXJyZW50X3RhYmxlLmhwcA==) | `99.68% <100.00%> (+0.02%)` | :arrow_up: | | [include/boost/unordered/detail/foa/core.hpp](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC91bm9yZGVyZWQvZGV0YWlsL2ZvYS9jb3JlLmhwcA==) | `99.84% <ø> (-0.16%)` | :arrow_down: | | [test/cfoa/visit\_tests.cpp](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC9jZm9hL3Zpc2l0X3Rlc3RzLmNwcA==) | `99.19% <96.92%> (-0.35%)` | :arrow_down: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/boostorg/unordered/pull/217/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Last update [44b669a...5afa714](https://app.codecov.io/gh/boostorg/unordered/pull/217?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg).