Skip to content

Add hash-aware insertion functions with a precalculated hash#94

Open
wjakob wants to merge 1 commit into
Tessil:masterfrom
mitsuba-renderer:master
Open

Add hash-aware insertion functions with a precalculated hash#94
wjakob wants to merge 1 commit into
Tessil:masterfrom
mitsuba-renderer:master

Conversation

@wjakob

@wjakob wjakob commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The precalculated_hash overloads currently exist only on the const lookup functions and erase; none of the insertion functions can accept a caller-provided hash. This commit adds try_emplace_hash(), insert_or_assign_hash() and insert_hash() to robin_map, and insert_hash() to robin_set.

(For context, I am developing a project where the possibility to avoid redundant hash computations leads to a pretty significant speedup when using tsl::robin_map).

The `precalculated_hash` overloads currently exist only on the const
lookup functions and `erase`; none of the insertion functions can accept
a caller-provided hash. This commit adds `try_emplace_hash()`,
`insert_or_assign_hash()` and `insert_hash()` to `robin_map`, and
`insert_hash()` to `robin_set`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant