Cache an arena's index in the arena.

This saves us a pointer hop down some perf-sensitive paths.
This commit is contained in:
David Goldblatt
2021-01-29 21:22:57 -08:00
committed by David Goldblatt
parent 229994a204
commit 4c46e11365
3 changed files with 8 additions and 1 deletions

View File

@@ -1475,6 +1475,7 @@ arena_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks) {
arena->base = base;
/* Set arena before creating background threads. */
arena_set(ind, arena);
arena->ind = ind;
nstime_init_update(&arena->create_time);