-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: `ThreadLocalPtr::get` and `ThreadLocal::get` wrap `StaticMeta::get`. We cache the static-meta's per-thread capacity and a pointer to the thread-entry in a thread-local cache, which `StaticMeta::get` looks at in the fast path to find the requested item. We currently get a pointer to the thread-vector from the thread-entry, and then get the item from the thread-vector. But this is an indirection which presumably adds latency to the overall operation. If we cache the static-meta's per-thread thread-vector as well, we eliminate this indirection and reduce the latency. Differential Revision: D59246804 fbshipit-source-id: c3716eef84493dc8c8f859faae7a3af223d3c4eb
- Loading branch information
1 parent
80fdd93
commit 785c433
Showing
2 changed files
with
113 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters