Repository navigation
Reset pooled relaters in place - #65327
Closed
Jake Bailey (jakebailey) wants to merge 1 commit into
Closed
Jake Bailey (jakebailey) wants to merge 1 commit into
Jake Bailey (jakebailey) wants to merge 1 commit into
Conversation
Returning a relater to the pool assigned a whole Relater literal that
reads from the relater being reset. Go therefore built the literal in
a stack temporary and copied it back, with a bulk write barrier over
the entire struct while the GC was marking. Relaters are recycled for
every top-level relation check, so on sentry this reset was about 0.7%
of CPU (0.51s of 72.6s in pprof); resetting the fields individually
drops it to 0.06s.
The saving is below wall-time noise, --checkers 4, n=8, default GC
settings:
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
Tsc/bluesky 2.570 ± 1% 2.548 ± 1% ~ (p=0.234 n=8)
Tsc/sentry 10.81 ± 2% 10.66 ± 3% ~ (p=0.234 n=8)
Tsc/t3code-server 11.40 ± 2% 11.43 ± 1% ~ (p=0.505 n=8)
Tsc/mui-docs 6.219 ± 1% 6.230 ± 2% ~ (p=0.777 n=8)
Tsc/vscode 11.71 ± 1% 11.64 ± 1% ~ (p=0.645 n=8)
geomean 7.458 7.421 -0.48%
│ old.txt │ new.txt │
│ check-sec │ check-sec vs base │
Tsc/bluesky 2.275 ± 2% 2.264 ± 1% ~ (p=0.740 n=8)
Tsc/sentry 9.963 ± 2% 9.841 ± 3% ~ (p=0.382 n=8)
Tsc/t3code-server 10.97 ± 2% 10.97 ± 1% ~ (p=0.574 n=8)
Tsc/mui-docs 5.647 ± 1% 5.659 ± 2% ~ (p=0.664 n=8)
Tsc/vscode 10.37 ± 1% 10.33 ± 1% ~ (p=0.699 n=8)
geomean 6.802 6.776 -0.37%
│ old.txt │ new.txt │
│ rss-B │ rss-B vs base │
Tsc/bluesky 1.174Gi ± 2% 1.170Gi ± 2% ~ (p=0.798 n=8)
Tsc/sentry 3.515Gi ± 4% 3.518Gi ± 5% ~ (p=1.000 n=8)
Tsc/t3code-server 2.853Gi ± 2% 2.914Gi ± 6% ~ (p=0.878 n=8)
Tsc/mui-docs 2.167Gi ± 3% 2.181Gi ± 4% ~ (p=0.959 n=8)
Tsc/vscode 4.707Gi ± 3% 4.714Gi ± 1% ~ (p=0.959 n=8)
geomean 2.606Gi 2.620Gi +0.54%
│ old.txt │ new.txt │
│ heap-B │ heap-B vs base │
Tsc/bluesky 925.8Mi ± 0% 926.0Mi ± 0% ~ (p=0.505 n=8)
Tsc/sentry 2.662Gi ± 0% 2.662Gi ± 0% ~ (p=0.775 n=8)
Tsc/t3code-server 2.282Gi ± 0% 2.281Gi ± 0% ~ (p=0.645 n=8)
Tsc/mui-docs 1.644Gi ± 0% 1.644Gi ± 0% ~ (p=0.505 n=8)
Tsc/vscode 3.995Gi ± 0% 3.995Gi ± 0% ~ (p=0.645 n=8)
geomean 2.048Gi 2.048Gi -0.00%
Member
Author
|
TypeScript Bot (@typescript-bot) perf test this faster |
Contributor
Contributor
|
Jake Bailey (@jakebailey) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Returning a relater to the pool assigned a whole Relater literal that reads from the relater being reset. Go therefore built the literal in a stack temporary and copied it back, with a bulk write barrier over the entire struct while the GC was marking. Relaters are recycled for every top-level relation check, so on sentry this reset was about 0.7% of CPU (0.51s of 72.6s in pprof); resetting the fields individually drops it to 0.06s.
The saving is below wall-time noise, --checkers 4, n=8, default GC settings: