FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

perf(query): pre-size slices in expansion helpers by shaunpatterson · Pull Request #9722 · dgraph-io/dgraph · GitHub

perf(query): pre-size slices in expansion helpers - #9722

Open
shaunpatterson wants to merge 1 commit into
dgraph-io:mainfrom
shaunpatterson:perf/query-presize-helpers
Open

perf(query): pre-size slices in expansion helpers#9722
shaunpatterson wants to merge 1 commit into
dgraph-io:mainfrom
shaunpatterson:perf/query-presize-helpers

Conversation

Copy link
Copy Markdown
Contributor

Pre-size known-length slices/maps in getPredsFromVals, expandSubgraph ACL intersection, getPredicatesFromTypes and filterUidPredicates. Estimates are never undersized; behavior unchanged.

BenchmarkGetPredsFromVals (representative): B/op -41%, time -31%.


Independent change; branched from 4b9b399d. Verified: package unit tests pass + Go benchmark (benchstat, p<0.01). Single-thread microbenchmarks; not yet run through the Docker integration suite.

shaunpatterson requested a review from a team as a code owner May 28, 2026 18:19
Pre-size known-length slices/maps in getPredsFromVals, expandSubgraph ACL
intersection, getPredicatesFromTypes and filterUidPredicates. Estimates are
never undersized; behavior unchanged.

BenchmarkGetPredsFromVals (representative): B/op -41%, time -31%.
shaunpatterson force-pushed the perf/query-presize-helpers branch from bd33bee to e6a7888 Compare July 14, 2026 01:37
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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL