-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
101693: sql: avoid string to byte conversion copies on insert path r=cucaroach a=cucaroach Originated from: #91930 Incorporate those changes and add a benchmark and add some more changes based on benchmark results. Broken into several commits: ### json: avoid copying json.AsText where possible Epic: None Release note: None ### pgwire: avoid some string to byte copies Most parse routines don't retain the input string pointer so we can use a pointer to the input bytes in those cases. Release note: None Epic: None ### builtins: avoid some []byte to string copies in decode Release note: None Epic: None ### valueside: remove string to []byte copies Release note: None Epic: None ### colenc: use new UnsafeConvertBytesToString Cosmetic change to use the new UnsafeConvertBytesToString. Release note: None Epic: None ### opt: avoid allocation in DBytes interning DBytes is a string under the covers but we usually operate on them with []byte APIs, avoid copies in these cases. Release note: None Epic: None ### tree: allow access to DBytes/DString/DEncodedKey raw bytes Epic: None Release note: None ### encoding: unsafeString -> UnsafeConvertBytesToString Make public for use elsewhere. Release note: None Epic: None ### lex: avoid some string to byte slice copies Facilitate some copy avoidance by using []byte instead of string. Only copy when necessary in some cases. Release note: None Epic: None ### bench: add a large insert benchmark This benchmark shows the reducation in allocations by the copy avoidance changes. Together the changes result in: ``` name old time/op new time/op delta SQL/Cockroach/InsertLarge/count=1000-10 18.7ms ± 4% 19.1ms ±26% ~ (p=0.780 n=9+10) name old alloc/op new alloc/op delta SQL/Cockroach/InsertLarge/count=1000-10 49.7MB ± 4% 39.7MB ±10% -20.19% (p=0.000 n=9+9) name old allocs/op new allocs/op delta SQL/Cockroach/InsertLarge/count=1000-10 39.0k ± 5% 29.7k ± 8% -23.83% (p=0.000 n=10+9) ``` Release note: None Epic: None 103551: build: make master `v23.2.0-alpha.00000000` r=rickystewart,srosenberg,postamar a=renatolabs v23.1.1 has been released, `master` should now be considered to be 23.2. Epic: none Release note: None 103859: goschedstats: support go1.20 r=rickystewart a=ajwerner There was one field added to the `p` that matters: needspinning (see golang/go@8cb350d). All of the relevant symbols and structs were re-copied. Some `uintptr`s were replaced with real pointers, and some things were ported to use new atomic types. Relates to #96443. Epic: none Release note: None 103948: liveness: split liveness cache out r=erikgrinaker a=andrewbaptist Move the liveness caching methods to a new file. Only look at the last 2 commits - I will rebase on master once those are merged. Epic: none Release note: None Co-authored-by: Tommy Reilly <[email protected]> Co-authored-by: Renato Costa <[email protected]> Co-authored-by: ajwerner <[email protected]> Co-authored-by: Andrew Baptist <[email protected]>
- Loading branch information
Showing
61 changed files
with
897 additions
and
568 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v23.1.0-alpha.8 | ||
v23.2.0-alpha.00000000 |
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
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
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
Oops, something went wrong.