-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimize bits of HistogramWrapper::add
Summary: * Move deferred initialization in `ensureApplySpec` from the fast-path to the slow-path. * Use `ThreadLocalPtr<TLHistogram>` v.s. `ThreadLocal<shared_ptr<TLHistogram>>` to reduce object size and to remove one level of indirection. `ThreadLocalPtr<T>` has special support for being assigned `shared_ptr<T>`. * Put spec on heap and delete it after deferred init to reduce its memory consumption. Reviewed By: Gownta Differential Revision: D66590811 fbshipit-source-id: 10ed7c5219bd6cfde0ca7d6d18ce52040ab239bb
- Loading branch information
1 parent
ec0310d
commit ebc0a7b
Showing
2 changed files
with
26 additions
and
22 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