Skip to content

perf(checker): fast-path compareNodes for identical AST parent containers and use cmp.Compare - #64551

Open
HazyLab (hazyhaar) wants to merge 1 commit into
microsoft:mainfrom
hazyhaar:perf/0gc-sgoiter-refactoring
Open

HazyLab (hazyhaar) wants to merge 1 commit into
microsoft:mainfrom
hazyhaar:perf/0gc-sgoiter-refactoring

Conversation

@hazyhaar

@hazyhaar HazyLab (hazyhaar) commented Sep 30, 2026 •

Copy link
Copy Markdown

Description

This PR introduces two focused optimizations in tsc/internal/checker/utilities.go:

  1. Fast-path in compareNodes for identical parent containers:

    • When two AST nodes share the same syntactic parent container (n1.Parent != nil && n1.Parent == n2.Parent), they are guaranteed to reside in the exact same SourceFile.
    • In this common case, the comparison immediately returns n1.Pos() - n2.Pos(), entirely eliding the full AST ancestry traversal to root SourceFile nodes (ast.GetSourceFileOfNode) and the subsequent file index map lookups.
    • The ordering semantics are 100% identical to the existing implementation.
  2. 64-bit integer overflow protection in compareSymbolsWorker:

    • Replaces integer subtraction int(ast.GetSymbolId(s1)) - int(ast.GetSymbolId(s2)) with cmp.Compare(ast.GetSymbolId(s1), ast.GetSymbolId(s2)) for the unique SymbolId fallback comparison.
    • Operates directly on the native 64-bit uint64 identifier without narrowing, eliminating any potential overflow risks.

Validation & Test Results

  • All targeted checker unit tests pass cleanly:
    go test -race -count=1 ./tsc/internal/checker/... -> PASS
  • Full official Microsoft test suite (TestLocal) verified bit-exact with 0 regressions and 0 data races.
  • Zero memory footprint impact (no allocations, pure in-place comparisons).

Copilot AI balanced review requested due to automatic review settings September 30, 2026 08:34
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 30, 2026
@typescript-automation

Copy link
Copy Markdown
Contributor

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

GC tuning affects long-lived modes, symbol IDs can collide after wraparound, and oracle tests depend on machine-local paths.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)
What changed in this PR

Adds GC, SIMD scanning, and symbol-layout optimizations to the native TypeScript compiler.

Changes:

  • Defaults GC tuning to GOGC=400.
  • Adds SIMD kernels and parity benchmarks for scanning and UTF-16 operations.
  • Compacts symbol IDs and reserves space for atom IDs.
File Description
tsc/​cmd/​tsc/​main.go Applies GC tuning at startup.
tsc/​internal/​core/​gctuning.go Defines GC tuning behavior.
tsc/​internal/​core/​gctuning_test.go Tests GC configuration.
tsc/​internal/​core/​core.go Uses accelerated line and UTF-16 kernels.
tsc/​internal/​core/​vectorkernels_simd.go Enables SIMD kernels on supported builds.
tsc/​internal/​core/​vectorkernels_nosimd.go Disables SIMD kernels elsewhere.
tsc/​internal/​core/​tsgo_lines_gen.go Implements AVX2 line scanning.
tsc/​internal/​core/​tsgo_lines_nosimd_gen.go Provides scalar line scanning.
tsc/​internal/​core/​tsgo_utf16_gen.go Implements AVX2 UTF-16 counting.
tsc/​internal/​core/​tsgo_utf16_nosimd_gen.go Provides scalar UTF-16 counting.
tsc/​internal/​core/​tsgo_parity_test.go Adds kernel parity tests.
tsc/​internal/​core/​tsgo_bench_test.go Adds core benchmarks.
tsc/​internal/​scanner/​scanner.go Accelerates comment scanning.
tsc/​internal/​scanner/​tsgo_skip_gen.go Implements AVX2 comment skipping.
tsc/​internal/​scanner/​tsgo_skip_nosimd_gen.go Provides scalar comment skipping.
tsc/​internal/​scanner/​tsgo_skip_parity_test.go Adds scanner parity tests.
tsc/​internal/​scanner/​tsgo_skip_bench_test.go Adds scanner benchmark.
tsc/​internal/​ast/​ids.go Narrows symbol IDs to 32 bits.
tsc/​internal/​ast/​utilities.go Narrows the global symbol counter.
tsc/​internal/​ast/​symbol.go Compacts symbol storage and adds AtomId.
tsc/​internal/​ast/​symbol_size_test.go Verifies symbol layout.
Files not reviewed (6)
  • tsc/internal/core/tsgo_lines_gen.go: Generated file
  • tsc/internal/core/tsgo_lines_nosimd_gen.go: Generated file
  • tsc/internal/core/tsgo_utf16_gen.go: Generated file
  • tsc/internal/core/tsgo_utf16_nosimd_gen.go: Generated file
  • tsc/internal/scanner/tsgo_skip_gen.go: Generated file
  • tsc/internal/scanner/tsgo_skip_nosimd_gen.go: Generated file

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread tsc/internal/ast/utilities.go Outdated
var (
nextNodeId atomic.Uint64
nextSymbolId atomic.Uint64
nextSymbolId atomic.Uint32

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually very possible that long running servers wrap around

Comment thread tsc/cmd/tsc/main.go Outdated

func runMain() int {
core.ApplyDebugStackLimit()
core.ApplyGCTuning()
Comment thread tsc/internal/core/tsgo_parity_test.go Outdated
Comment on lines +21 to +22
tsgoLinesSource = "/devhoros/c2simd/sources/tsgo/tsgo_lines.c"
tsgoUTF16Source = "/devhoros/c2simd/sources/tsgo/tsgo_utf16.c"

// tsgoSkipSource is the C source the tsgo_skip*_gen.go files are transpiled
// from by sgoiter; the gcc oracle below compiles it unchanged.
const tsgoSkipSource = "/devhoros/c2simd/sources/tsgo/tsgo_skip.c"
@hazyhaar

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@hazyhaar
HazyLab (hazyhaar) force-pushed the perf/0gc-sgoiter-refactoring branch from bfa8c16 to b4e6d60 Compare September 30, 2026 14:41
@hazyhaar HazyLab (hazyhaar) changed the title tsc: default GOGC=400, SIMD-accelerated comment scanning, and Symbol compaction perf: tune batch GC default, fast-path AST node comparison, and add SIMD skip/lines/utf16 kernels Sep 30, 2026
@jakebailey

Copy link
Copy Markdown
Member

This PR contains totally unrelated changes. If we want any of this they'd have to be split into different PRs.

Turning up GOGC is also going to really increase the memory footprint.

…rs and use cmp.Compare

Fast-path compareNodes when two AST nodes share the same direct parent container (n1.Parent == n2.Parent),
avoiding full AST traversals to root SourceFiles while preserving identical Pos() ordering.
Use cmp.Compare for 64-bit SymbolId fallback comparison in compareSymbolsWorker to avoid
potential integer overflow.
@hazyhaar
HazyLab (hazyhaar) force-pushed the perf/0gc-sgoiter-refactoring branch from b4e6d60 to 407a692 Compare September 30, 2026 15:37
@hazyhaar HazyLab (hazyhaar) changed the title perf: tune batch GC default, fast-path AST node comparison, and add SIMD skip/lines/utf16 kernels perf(checker): fast-path compareNodes for identical AST parent containers and use cmp.Compare Sep 30, 2026
@hazyhaar

Copy link
Copy Markdown
Author

Agreed, thanks for the review. This PR mixed three unrelated changes.

I have reduced this PR to the checker optimization only:

  1. Fast-path in compareNodes when both nodes share the same syntactic parent container (n1.Parent != nil && n1.Parent == n2.Parent). Because nodes with the same parent are guaranteed to reside in the same source file, this immediately returns n1.Pos() - n2.Pos(), eliding the full AST ancestry traversal to root SourceFile nodes while preserving identical ordering semantics.
  2. Use cmp.Compare for the final 64-bit SymbolId fallback comparison instead of subtraction to avoid potential integer overflow.

Regarding your other points:

  • 32-bit Symbol IDs: The narrowing was already removed in the previous push (the inline review comment was attached to the obsolete commit bfa8c169). Long-running language servers definitely require 64-bit IDs to prevent wraparound; cmp.Compare operates directly on the native 64-bit SymbolId.
  • GOGC tuning: Dropped entirely. You are right that raising the default trades RSS memory for throughput, which is undesirable in memory-constrained CI and container environments, and users who want that trade-off can already export GOGC in their environment.
  • SIMD kernels: Withdrawn from this PR. Since simd/archsimd is experimental and not enabled in shipped builds, I will save any discussion of vectorized scanning for a dedicated issue with end-to-end compiler benchmarks first.

The branch has been updated to reflect only this minimal checker change.

@jakebailey

Copy link
Copy Markdown
Member

The PR description is still describing the original state.

@DanielRosenwasser

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) perf test this

@typescript-automation

typescript-automation Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test this ✅ Started ❌ Results

@typescript-automation

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@DanielRosenwasser), the perf run you requested failed. You can check the log here.

@jakebailey

Copy link
Copy Markdown
Member

mui is broken because they're using pnpm 12 which segfaults 😢

@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) perf test this

@typescript-automation

typescript-automation Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test this ✅ Started 👀 Results

@typescript-automation

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - native
Errors 41 41 ~ ~ ~ p=1.000 n=12
Symbols 115,276 115,276 ~ ~ ~ p=1.000 n=12
Types 79,613 79,613 ~ ~ ~ p=1.000 n=12
Memory Used 141,310k (± 0.46%) 141,621k (± 0.46%) ~ 139,997k 143,498k p=0.410 n=12
Memory Allocs 2,194,650 (± 0.00%) 2,194,703 (± 0.01%) ~ 2,194,451 2,195,081 p=0.713 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.050s (± 3.21%) 0.051s (± 2.78%) ~ 0.047s 0.054s p=0.229 n=12
Bind Time 0.015s (± 8.61%) 0.016s (±12.94%) ~ 0.013s 0.022s p=0.654 n=12
Check Time 0.603s (± 0.69%) 0.587s (± 0.82%) -0.016s (- 2.64%) 0.576s 0.603s p=0.000 n=12
Emit Time 0.324s (± 1.90%) 0.326s (± 2.31%) ~ 0.306s 0.343s p=0.766 n=12
Total Time 1.000s (± 0.84%) 0.987s (± 1.14%) ~ 0.964s 1.020s p=0.080 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 846,335 (± 0.10%) 846,487 (± 0.08%) ~ 844,206 848,098 p=1.000 n=12
Types 249,940 (± 0.00%) 249,938 (± 0.00%) -1 (- 0.00%) 249,937 249,941 p=0.032 n=12
Memory Used 789,152k (± 0.04%) 789,329k (± 0.07%) ~ 788,286k 791,013k p=0.468 n=12
Memory Allocs 12,935,441 (± 0.03%) 12,935,566 (± 0.03%) ~ 12,930,250 12,943,829 p=0.590 n=12
Config Time 0.020s 0.020s ~ ~ ~ p=1.000 n=12
Parse Time 0.334s (± 2.54%) 0.339s (± 2.28%) ~ 0.318s 0.355s p=0.285 n=12
Bind Time 0.082s (±15.17%) 0.081s (±13.19%) ~ 0.071s 0.119s p=0.986 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.940s (± 1.62%) 1.912s (± 1.79%) ~ 1.865s 2.018s p=0.259 n=12
Total Time 2.398s (± 1.51%) 2.373s (± 1.86%) ~ 2.319s 2.523s p=0.235 n=12
mui-docs - native
Errors 11,401 (± 0.03%) 11,399 (± 0.04%) ~ 11,382 11,405 p=0.461 n=12
Symbols 4,450,780 4,450,780 ~ ~ ~ p=1.000 n=12
Types 1,441,847 1,441,847 ~ ~ ~ p=1.000 n=12
Memory Used 3,189,703k (± 0.06%) 3,188,513k (± 0.03%) ~ 3,186,041k 3,191,264k p=0.410 n=12
Memory Allocs 34,630,267 (± 0.07%) 34,617,715 (± 0.04%) ~ 34,572,503 34,655,352 p=0.291 n=12
Config Time 0.019s 0.019s ~ ~ ~ p=1.000 n=12
Parse Time 0.714s (± 1.99%) 0.701s (± 1.89%) ~ 0.672s 0.732s p=0.139 n=12
Bind Time 0.002s (±11.30%) 0.002s (± 8.72%) ~ 0.002s 0.003s p=1.000 n=12
Check Time 10.471s (± 1.15%) 10.348s (± 1.13%) ~ 10.034s 10.552s p=0.124 n=12
Emit Time 0.616s (±14.98%) 0.612s (±15.22%) ~ 0.515s 0.864s p=0.400 n=12
Total Time 12.776s (± 0.49%) 12.632s (± 0.49%) -0.144s (- 1.13%) 12.464s 12.762s p=0.003 n=12
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,390,229 1,390,229 ~ ~ ~ p=1.000 n=12
Types 441,498 441,498 ~ ~ ~ p=1.000 n=12
Memory Used 1,692,614k (± 0.99%) 1,685,731k (± 0.88%) ~ 1,647,332k 1,715,531k p=0.443 n=12
Memory Allocs 92,708,526 (± 0.14%) 92,776,798 (± 0.09%) ~ 92,524,531 93,051,369 p=0.755 n=12
Config Time 0.006s (±14.94%) 0.006s (±15.03%) ~ 0.004s 0.008s p=0.214 n=12
Parse Time 0.258s (± 3.46%) 0.254s (± 3.02%) ~ 0.230s 0.270s p=0.523 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 2.171s (± 0.56%) 2.074s (± 0.50%) 🟩-0.097s (- 4.48%) 2.041s 2.096s p=0.000 n=12
Emit Time 0.365s (± 3.66%) 0.357s (± 3.31%) ~ 0.325s 0.384s p=0.355 n=12
Total Time 28.356s (± 0.50%) 27.407s (± 0.40%) 🟩-0.949s (- 3.35%) 27.123s 27.617s p=0.000 n=12
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 334,953 334,953 ~ ~ ~ p=1.000 n=12
Types 197,616 197,616 ~ ~ ~ p=1.000 n=12
Memory Used 313,285k (± 0.03%) 313,457k (± 0.07%) ~ 313,137k 314,382k p=0.291 n=12
Memory Allocs 4,627,994 (± 0.01%) 4,628,306 (± 0.01%) ~ 4,626,722 4,629,129 p=0.443 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.116s (± 3.51%) 0.116s (± 3.96%) ~ 0.105s 0.126s p=0.989 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.044s (± 0.44%) 1.011s (± 0.55%) 🟩-0.033s (- 3.15%) 0.997s 1.027s p=0.000 n=12
Emit Time 0.128s (±12.00%) 0.123s (±12.20%) ~ 0.094s 0.158s p=0.640 n=12
Total Time 1.339s (± 0.92%) 1.302s (± 1.07%) -0.036s (- 2.70%) 1.273s 1.354s p=0.001 n=12
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=12
Symbols 303,834 303,834 ~ ~ ~ p=1.000 n=12
Types 181,663 181,663 ~ ~ ~ p=1.000 n=12
Memory Used 273,903k (± 0.02%) 273,991k (± 0.02%) +89k (+ 0.03%) 273,805k 274,120k p=0.032 n=12
Memory Allocs 1,617,901 (± 0.01%) 1,618,187 (± 0.02%) ~ 1,617,557 1,619,798 p=0.291 n=12
Config Time 0.000s (±146.91%) 0.000s (±92.91%) ~ 0.000s 0.001s p=0.640 n=12
Parse Time 0.101s (± 3.89%) 0.098s (± 3.36%) ~ 0.092s 0.110s p=0.138 n=12
Bind Time 0.037s (±10.95%) 0.038s (±12.20%) ~ 0.030s 0.053s p=0.876 n=12
Check Time 0.822s (± 0.70%) 0.786s (± 0.40%) 🟩-0.035s (- 4.31%) 0.778s 0.795s p=0.000 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.974s (± 0.90%) 0.937s (± 0.64%) 🟩-0.037s (- 3.84%) 0.917s 0.950s p=0.000 n=12
vscode - native
Errors 382 382 ~ ~ ~ p=1.000 n=12
Symbols 10,139,625 10,139,625 ~ ~ ~ p=1.000 n=12
Types 3,409,301 3,409,301 ~ ~ ~ p=1.000 n=12
Memory Used 6,613,682k (± 0.02%) 6,613,555k (± 0.02%) ~ 6,608,545k 6,617,438k p=0.977 n=12
Memory Allocs 50,917,969 (± 0.01%) 50,927,555 (± 0.03%) ~ 50,909,129 50,990,736 p=0.514 n=12
Config Time 0.067s (± 0.46%) 0.068s (± 0.49%) ~ 0.067s 0.068s p=0.680 n=12
Parse Time 1.814s (± 3.20%) 1.874s (± 2.93%) ~ 1.740s 1.987s p=0.052 n=12
Bind Time 0.548s (±23.41%) 0.477s (±19.16%) ~ 0.409s 0.824s p=0.743 n=12
Check Time 13.198s (± 1.89%) 13.214s (± 1.54%) ~ 12.629s 13.552s p=0.311 n=12
Emit Time 4.426s (±13.11%) 4.212s (±10.05%) ~ 3.736s 5.612s p=0.590 n=12
Total Time 20.163s (± 2.11%) 19.952s (± 1.41%) ~ 19.529s 20.945s p=0.630 n=12
webpack - native
Errors 581 581 ~ ~ ~ p=1.000 n=12
Symbols 1,276,961 1,276,961 ~ ~ ~ p=1.000 n=12
Types 598,840 598,840 ~ ~ ~ p=1.000 n=12
Memory Used 971,974k (± 0.01%) 972,069k (± 0.02%) ~ 971,441k 972,340k p=0.242 n=12
Memory Allocs 6,316,254 (± 0.06%) 6,314,126 (± 0.01%) ~ 6,312,674 6,315,840 p=0.266 n=12
Config Time 0.007s 0.007s ~ ~ ~ p=1.000 n=12
Parse Time 0.229s (± 3.09%) 0.228s (± 3.74%) ~ 0.203s 0.247s p=0.921 n=12
Bind Time 0.059s (±15.19%) 0.063s (±20.39%) ~ 0.049s 0.098s p=0.741 n=12
Check Time 1.509s (± 0.53%) 1.490s (± 0.50%) -0.019s (- 1.25%) 1.469s 1.508s p=0.002 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.833s (± 0.76%) 1.815s (± 0.69%) -0.019s (- 1.02%) 1.795s 1.852s p=0.009 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,030,692 1,030,692 ~ ~ ~ p=1.000 n=12
Types 376,396 376,396 ~ ~ ~ p=1.000 n=12
Memory Used 598,497k (± 0.01%) 598,423k (± 0.02%) ~ 598,055k 598,638k p=0.291 n=12
Memory Allocs 4,761,373 (± 0.03%) 4,760,400 (± 0.02%) ~ 4,757,505 4,764,600 p=0.219 n=12
Config Time 0.002s 0.002s ~ ~ ~ p=1.000 n=12
Parse Time 0.118s (± 4.13%) 0.113s (± 2.90%) ~ 0.106s 0.123s p=0.145 n=12
Bind Time 0.031s (±14.79%) 0.038s (±19.40%) ~ 0.026s 0.057s p=0.242 n=12
Check Time 0.887s (± 0.78%) 0.878s (± 0.69%) -0.009s (- 1.00%) 0.867s 0.902s p=0.037 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.049s (± 1.01%) 1.040s (± 0.75%) ~ 1.020s 1.055s p=0.183 n=12
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • mui-docs - native
  • strada-build-src - native
  • strada-compiler - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

lsp

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsLSP - native
Req 1 - updateOpen 12ms (±16.23%) 12ms (±14.88%) ~ 9ms 18ms p=0.994 n=12
Req 2 - geterr 567ms (± 0.49%) 554ms (± 0.43%) -13ms (- 2.31%) 550ms 562ms p=0.000 n=12
Req 3 - references 42ms (± 4.88%) 45ms (± 5.72%) ~ 39ms 51ms p=0.073 n=12
Req 4 - navto 17ms (± 1.99%) 17ms (± 5.23%) ~ 16ms 21ms p=0.531 n=12
Req 5 - completionInfo count 1,363 1,363 ~ ~ ~ p=1.000 n=12
Req 5 - completionInfo 16ms (± 4.70%) 16ms (± 7.24%) ~ 13ms 19ms p=0.315 n=12
CompilerLSP - native
Req 1 - updateOpen 11ms (±10.89%) 11ms (±13.79%) ~ 9ms 15ms p=0.709 n=12
Req 2 - geterr 295ms (± 0.56%) 291ms (± 0.87%) -4ms (- 1.44%) 284ms 298ms p=0.008 n=12
Req 3 - references 50ms (± 5.00%) 50ms (± 3.82%) ~ 47ms 55ms p=0.918 n=12
Req 4 - navto 17ms (± 1.58%) 17ms (± 3.22%) ~ 17ms 20ms p=0.491 n=12
Req 5 - completionInfo count 1,525 1,525 ~ ~ ~ p=1.000 n=12
Req 5 - completionInfo 17ms (± 9.70%) 17ms (± 5.24%) ~ 15ms 19ms p=0.830 n=12
System info unknown
Hosts
  • native
Scenarios
  • CompilerLSP - native
  • Compiler-UnionsLSP - native
  • xstate-main-1-LSP - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
lsp-startup - native
Execution time 4.69ms (±365.09%) 4.68ms (±365.08%) -0.01ms (- 0.29%) 0.00ms 470.71ms p=0.000 n=1200
tsgo-startup - native
Execution time 5.77ms (±365.09%) 5.76ms (±365.09%) -0.01ms (- 0.21%) 0.00ms 581.86ms p=0.000 n=1200
System info unknown
Hosts
  • native
Scenarios
  • lsp-startup - native
  • tsgo-startup - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

Developer Information:

Download Benchmarks

@jakebailey

Jake Bailey (jakebailey) commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

This seems well and good, but the PR description is out of date. My bad, no it's not.

I also wonder if we could check more parents safely, even see if any of the two levels are the same or something. I bet there's a tradeoff of extra parent checks saving comparisons and not.

Or, we should do some sort of more clever parent thing generally because GetSourceFileOfNode is a parent walk in itself....

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused changes preserve existing ordering behavior while avoiding unnecessary traversal and integer narrowing.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

4 participants