perf(table): group positional deletes by file path in one pass - #1724
Open
fallintoplace wants to merge 2 commits into
Open
perf(table): group positional deletes by file path in one pass#1724fallintoplace wants to merge 2 commits into
fallintoplace wants to merge 2 commits into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Group positional deletes by file path in one pass.
The old implementation found the unique paths and then ran an equality expression and filter over the full columns once per path. This version walks the file_path and pos values once, appends each position to its path's builder, and keeps the existing per-file map semantics.
It also:
Benchmark
1M rows, identical generated input on base
65005959and this branch, Apple M1 Pro, darwin/arm64,-benchtime=100ms -count=3. Values are the median of three runs.The benchmark also runs 64 file_path chunks against 65 position chunks. In a 500ms, three-run check, this stayed within run-to-run noise of the single-chunk case, with B/op effectively flat and at most one additional allocation per operation.
Checks
go test ./table -count=1go test -race ./table -run '^TestGroupPosDeletesByFilePath' -count=1go vet ./tablegolangci-lint run ./table --timeout=10mgo test $(go list ./... | rg -v '/io/gocloud$') -count=1