forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
137632: ctxutil: bundle up fastValueCtx allocs in Batch r=RaduBerinde a=RaduBerinde This commit adds `fastValuesContainer` which preallocates multiple `fastValueCtx` objects. Contexts allocated from a container retain a reference to the container, allowing it to be used by new descendant contexts. We use this explicitly in `Batch()` where we annotate a context three times (once at the node level, then at the store level, then at the replica level). ``` name old time/op new time/op delta Sysbench/KV/3node/oltp_read_write-10 2.41ms ± 1% 2.37ms ± 2% -1.71% (p=0.001 n=8+9) Sysbench/SQL/3node/oltp_read_write-10 5.15ms ± 4% 5.19ms ± 4% ~ (p=0.631 n=10+10) name old alloc/op new alloc/op delta Sysbench/KV/3node/oltp_read_write-10 1.43MB ± 0% 1.43MB ± 0% +0.15% (p=0.001 n=10+10) Sysbench/SQL/3node/oltp_read_write-10 2.49MB ± 1% 2.50MB ± 0% +0.37% (p=0.024 n=9+9) name old allocs/op new allocs/op delta Sysbench/KV/3node/oltp_read_write-10 6.21k ± 0% 6.14k ± 0% -1.19% (p=0.000 n=9+9) Sysbench/SQL/3node/oltp_read_write-10 10.5k ± 0% 10.5k ± 0% -0.48% (p=0.000 n=10+10) ``` Informs: cockroachdb#135904 Release note: None Co-authored-by: Radu Berinde <[email protected]>
- Loading branch information
Showing
3 changed files
with
127 additions
and
44 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
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