Skip to content

feat: add pointer access and alias attributes - #2598

Draft
zhouguangyuan0718 wants to merge 1 commit into
codex/source-result-relations-20260915from
codex/source-pointer-attributes-20260915
Draft

zhouguangyuan0718 wants to merge 1 commit into
codex/source-result-relations-20260915from
codex/source-pointer-attributes-20260915

Conversation

@zhouguangyuan0718

@zhouguangyuan0718 zhouguangyuan0718 commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Adds access(none/read/write/readwrite) and noalias on pointer parameters and receivers, completing the scoped attributes in #2590.

//llgo:param(dst) access(write)
//llgo:param(src) access(read)
func CopyOne(dst, src *int) { *dst = *src }

The compiler validates pointer selectors and maps them to LLVM parameter attributes, preserving their source meaning when other arguments or results require ABI conversion. access restricts accesses through the selected pointer; noalias restricts independent accesses to modified memory and permits shared reads of unmodified memory. Applicable runtime hash, equality, copy, clear, map-length and channel-capacity helpers use source annotations.

Definitions and imported declarations conservatively omit pointer restrictions in modes with GC root publication or cooperative safepoints. Other compiler-generated runtime protocols diagnose retained restrictions at the annotation. A small callback carries the same check into late large-result allocation. Source positions remain in backend-owned Go data.

Depends on #2597. This diff contains only pointer access/alias support and its runtime checks.

Validation on macOS arm64, Go 1.27.0 / LLVM 22.1.8:

  • Complete cl, ssa, internal/funcattrs, internal/abi and internal/build suites passed; C ABI unit tests passed excluding external toolchain build/corpus tests.
  • Four-target C ABI checks preserved noalias and readonly on the source pointer through byval/sret conversion, with no leakage onto transfer storage.
  • Instrumentation tests covered closures, defer/recover protocols, local contexts, shadow stacks, tracing and late ABI allocation; definitions/imports and hidden environments use consistent policies.
  • The Wasm linear-GC build retained the runtime root chain, omitted the copy pointer's native restriction and preserved map-length range information.
  • Complete runtime tests passed at O2 with default GC and nogc, including overlapping copies in both directions, reads after mutation, valid noalias stores and shared reads through identical pointers.
  • Five cache stages passed: first build, cache hit, annotation-only removal, restoration and another hit. Optimized executable assembly eliminated the noalias store's reload only while annotations were present.

Review order: #2572 (function properties) → #2595 (parameter and single-result values) → #2596 (large-aggregate projections) → #2597 (result relations and multiple results) → #2598 (pointer access and aliasing). Each PR targets its predecessor so its diff contains only that step.

@codecov

codecov Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.30435% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/abi/large.go 50.00% 2 Missing ⚠️
internal/funcattrs/pointers.go 93.10% 2 Missing ⚠️
internal/build/build.go 50.00% 1 Missing ⚠️
ssa/value_attributes.go 87.50% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

20122deb8c3d | workflow run | long-term charts

WebAssembly output sizes

Profile and compiler Wasm module vs base Generated JS glue vs base
ec32/LLGo 113311 B 0 B / +0.0% 70736 B 0 B / +0.0%
ec64/LLGo 118717 B 0 B / +0.0% 74033 B 0 B / +0.0%
js/Go 1895533 B 0 B / +0.0% 0 B 0 B / 0.0%
js/LLGo 66161 B 0 B / +0.0% 68511 B 0 B / +0.0%
wasip1/Go 1909947 B 0 B / +0.0% 0 B 0 B / 0.0%
wasip1/LLGo 72437 B 0 B / +0.0% 0 B 0 B / 0.0%
wc32/LLGo 117383 B 0 B / +0.0% 0 B 0 B / 0.0%

LLGo WebAssembly build measurements

Profile Build vs base
ec32 5.470 s +160.9 ms / +3.0% (worse)
ec64 5.076 s +62.39 ms / +1.2% (worse)
js 4.553 s +89.42 ms / +2.0% (worse)
wasip1 3.068 s +74.45 ms / +2.5% (worse)
wc32 3.782 s +8.57 ms / +0.2% (worse)

Compared with 38463561e6f3 measured in the same runner job.

@github-actions

Copy link
Copy Markdown

LLGo baseline benchmarks

20122deb8c3d | workflow run | long-term charts

Program measurements

Platform Workload File size vs base Text size vs base Build vs base Run vs base
Linux cprintf 19832 B 0 B / +0.0% 387 B 0 B / +0.0% 475.763 ms -19.2 ms / -3.9% (better) 1.270 ms +7.292 us / +0.6% (worse)
Linux cprintf-lto 19584 B 0 B / +0.0% 368 B 0 B / +0.0% 475.734 ms -18.35 ms / -3.7% (better) 1.268 ms +5.992 us / +0.5% (worse)
Linux fmtprintf 1624256 B 0 B / +0.0% 492621 B 0 B / +0.0% 4.094 s -44.79 ms / -1.1% (better) 3.325 ms +57.83 us / +1.8% (worse)
Linux fmtprintf-lto 1481160 B 0 B / +0.0% 434658 B 0 B / +0.0% 11.840 s -500.8 ms / -4.1% (better) 3.240 ms +12.57 us / +0.4% (worse)
Linux println 62288 B 0 B / +0.0% 14436 B 0 B / +0.0% 480.837 ms -3.609 ms / -0.7% (better) 1.744 ms +31.67 us / +1.9% (worse)
Linux println-lto 54232 B 0 B / +0.0% 12037 B 0 B / +0.0% 736.148 ms +47.02 ms / +6.8% (worse) 1.706 ms +156.7 us / +10.1% (worse)
macOS cprintf 84480 B 0 B / +0.0% 17101 B 0 B / +0.0% 735.751 ms +91.2 ms / +14.1% (worse) 4.190 ms +354.7 us / +9.2% (worse)
macOS cprintf-lto 84288 B 0 B / +0.0% 12865 B 0 B / +0.0% 727.461 ms -67.84 ms / -8.5% (better) 4.604 ms +1.184 ms / +34.6% (worse)
macOS fmtprintf 1457808 B 0 B / +0.0% 864868 B 0 B / +0.0% 3.293 s -45.8 ms / -1.4% (better) 4.869 ms -1.66 ms / -25.4% (better)
macOS fmtprintf-lto 1175824 B 0 B / +0.0% 844100 B 0 B / +0.0% 9.446 s -923.4 ms / -8.9% (better) 7.898 ms +3.674 ms / +87.0% (worse)
macOS println 114992 B 0 B / +0.0% 34148 B 0 B / +0.0% 765.581 ms +166.1 ms / +27.7% (worse) 4.777 ms +1.346 ms / +39.2% (worse)
macOS println-lto 118720 B 0 B / +0.0% 31904 B 0 B / +0.0% 888.787 ms +86.82 ms / +10.8% (worse) 4.871 ms +1.432 ms / +41.6% (worse)
Windows MinGW cprintf 19456 B 0 B / +0.0% 4550 B 0 B / +0.0% 1.126 s -78.6 ms / -6.5% (better) 3.436 ms -536.1 us / -13.5% (better)
Windows MinGW cprintf-lto 17920 B 0 B / +0.0% 4486 B 0 B / +0.0% 1.112 s -100.2 ms / -8.3% (better) 3.470 ms -268.2 us / -7.2% (better)
Windows MinGW fmtprintf 1895424 B 0 B / +0.0% 596598 B 0 B / +0.0% 4.040 s -55.76 ms / -1.4% (better) 8.539 ms +43.4 us / +0.5% (worse)
Windows MinGW fmtprintf-lto 1939968 B 0 B / +0.0% 546390 B 0 B / +0.0% 9.871 s -86.21 ms / -0.9% (better) 8.148 ms +580.9 us / +7.7% (worse)
Windows MinGW println 71680 B 0 B / +0.0% 23638 B 0 B / +0.0% 1.075 s -64.91 ms / -5.7% (better) 6.230 ms -341.3 us / -5.2% (better)
Windows MinGW println-lto 66048 B 0 B / +0.0% 20486 B 0 B / +0.0% 1.304 s -25 ms / -1.9% (better) 6.956 ms +303.1 us / +4.6% (worse)
Windows MinGW 386 cprintf 42496 B 0 B / +0.0% 5326 B 0 B / +0.0% 1.133 s +27.36 ms / +2.5% (worse) 5.162 ms +59.3 us / +1.2% (worse)
Windows MinGW 386 cprintf-lto 20992 B 0 B / +0.0% 5094 B 0 B / +0.0% 1.129 s -9.379 ms / -0.8% (better) 5.004 ms -110.8 us / -2.2% (better)
Windows MinGW 386 fmtprintf 1858560 B 0 B / +0.0% 468398 B 0 B / +0.0% 4.197 s +112.2 ms / +2.7% (worse) 10.604 ms -235.2 us / -2.2% (better)
Windows MinGW 386 fmtprintf-lto 2175488 B 0 B / +0.0% 450350 B 0 B / +0.0% 9.851 s +167.2 ms / +1.7% (worse) 10.793 ms +320.6 us / +3.1% (worse)
Windows MinGW 386 println 92160 B 0 B / +0.0% 19654 B 0 B / +0.0% 1.141 s +27.28 ms / +2.4% (worse) 8.569 ms -447 us / -5.0% (better)
Windows MinGW 386 println-lto 70144 B 0 B / +0.0% 17582 B 0 B / +0.0% 1.298 s -15.33 ms / -1.2% (better) 8.854 ms +117.1 us / +1.3% (worse)
Windows MinGW ARM64 cprintf 18944 B 0 B / +0.0% 4408 B 0 B / +0.0% 1.483 s -22.93 ms / -1.5% (better) 6.918 ms -456.8 us / -6.2% (better)
Windows MinGW ARM64 cprintf-lto 17920 B 0 B / +0.0% 4340 B 0 B / +0.0% 1.513 s -1.468 ms / -0.1% (better) 6.999 ms -734.6 us / -9.5% (better)
Windows MinGW ARM64 fmtprintf 1779712 B 0 B / +0.0% 505200 B 0 B / +0.0% 4.356 s -145.6 ms / -3.2% (better) 13.650 ms -1.088 ms / -7.4% (better)
Windows MinGW ARM64 fmtprintf-lto 1863680 B 0 B / +0.0% 475616 B 0 B / +0.0% 10.399 s -194.5 ms / -1.8% (better) 13.963 ms -1.135 ms / -7.5% (better)
Windows MinGW ARM64 println 68608 B 0 B / +0.0% 22096 B 0 B / +0.0% 1.474 s -66.01 ms / -4.3% (better) 11.969 ms +147.9 us / +1.3% (worse)
Windows MinGW ARM64 println-lto 64000 B 0 B / +0.0% 19392 B 0 B / +0.0% 1.682 s -46.04 ms / -2.7% (better) 11.751 ms -791.5 us / -6.3% (better)
Windows MSVC cprintf 120320 B 0 B / +0.0% 65782 B 0 B / +0.0% 892.500 ms -51.62 ms / -5.5% (better) 3.340 ms -135.2 us / -3.9% (better)
Windows MSVC cprintf-lto 119808 B 0 B / +0.0% 65718 B 0 B / +0.0% 1.091 s -89.69 ms / -7.6% (better) 3.616 ms +209.5 us / +6.2% (worse)
Windows MSVC fmtprintf 1624576 B 0 B / +0.0% 692102 B 0 B / +0.0% 3.721 s +108.3 ms / +3.0% (worse) 9.108 ms +357.1 us / +4.1% (worse)
Windows MSVC fmtprintf-lto 1625600 B 0 B / +0.0% 648598 B 0 B / +0.0% 9.073 s +197.5 ms / +2.2% (worse) 9.739 ms +1.101 ms / +12.7% (worse)
Windows MSVC println 192512 B 0 B / +0.0% 119062 B 0 B / +0.0% 897.194 ms -5.192 ms / -0.6% (better) 6.882 ms -365.4 us / -5.0% (better)
Windows MSVC println-lto 189952 B 0 B / +0.0% 116406 B 0 B / +0.0% 1.069 s +1.788 ms / +0.2% (worse) 6.898 ms -1.491 ms / -17.8% (better)
Windows MSVC 386 cprintf 9728 B 0 B / +0.0% 3931 B 0 B / +0.0% 997.853 ms +82.04 ms / +9.0% (worse) 8.444 ms +2.98 ms / +54.5% (worse)
Windows MSVC 386 cprintf-lto 9216 B 0 B / +0.0% 3853 B 0 B / +0.0% 929.748 ms -692.1 us / -0.1% (better) 5.310 ms -250.4 us / -4.5% (better)
Windows MSVC 386 fmtprintf 1188864 B 0 B / +0.0% 451786 B 0 B / +0.0% 3.774 s -80.13 ms / -2.1% (better) 12.063 ms -597.5 us / -4.7% (better)
Windows MSVC 386 fmtprintf-lto 1232896 B 0 B / +0.0% 428891 B 0 B / +0.0% 8.854 s -307.3 ms / -3.4% (better) 11.073 ms -1.607 ms / -12.7% (better)
Windows MSVC 386 println 34816 B 0 B / +0.0% 18493 B 0 B / +0.0% 905.771 ms -1.246 ms / -0.1% (better) 9.140 ms -268.9 us / -2.9% (better)
Windows MSVC 386 println-lto 32256 B 0 B / +0.0% 16638 B 0 B / +0.0% 1.079 s -59.11 ms / -5.2% (better) 9.232 ms -664.5 us / -6.7% (better)
Windows MSVC ARM64 cprintf 11264 B 0 B / +0.0% 3976 B 0 B / +0.0% 2.059 s -125 ms / -5.7% (better) 7.241 ms -750.1 us / -9.4% (better)
Windows MSVC ARM64 cprintf-lto 10752 B 0 B / +0.0% 3868 B 0 B / +0.0% 2.043 s -104.5 ms / -4.9% (better) 7.240 ms -234 us / -3.1% (better)
Windows MSVC ARM64 fmtprintf 1369600 B 0 B / +0.0% 506724 B 0 B / +0.0% 6.522 s -114.2 ms / -1.7% (better) 15.122 ms -974 us / -6.1% (better)
Windows MSVC ARM64 fmtprintf-lto 1397248 B 0 B / +0.0% 478440 B 0 B / +0.0% 16.059 s -316.8 ms / -1.9% (better) 15.257 ms +130.5 us / +0.9% (worse)
Windows MSVC ARM64 println 41472 B 0 B / +0.0% 21552 B 0 B / +0.0% 2.021 s +16.53 ms / +0.8% (worse) 12.274 ms -337 us / -2.7% (better)
Windows MSVC ARM64 println-lto 39424 B 0 B / +0.0% 19320 B 0 B / +0.0% 2.341 s -103.6 ms / -4.2% (better) 12.654 ms -952.1 us / -7.0% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.550 ns/op -0.03 ns/op / -0.2% (better)
Linux BenchmarkMergeCompilerFlags 204.200 ns/op -1 ns/op / -0.5% (better)
Linux BenchmarkMergeLinkerFlags 135.500 ns/op +9.2 ns/op / +7.3% (worse)
Linux BenchmarkChannelBuffered 55.860 ns/op +0.14 ns/op / +0.3% (worse)
Linux BenchmarkChannelHandoff 19630 ns/op +5479 ns/op / +38.7% (worse)
Linux BenchmarkDefer 52.940 ns/op -1.99 ns/op / -3.6% (better)
Linux BenchmarkDirectCall 1.169 ns/op +0.003 ns/op / +0.3% (worse)
Linux BenchmarkGlobalRead 1.177 ns/op +0.008 ns/op / +0.7% (worse)
Linux BenchmarkGlobalWrite 7.981 ns/op +0.187 ns/op / +2.4% (worse)
Linux BenchmarkGoroutine 23903 ns/op +1894 ns/op / +8.6% (worse)
Linux BenchmarkInterfaceCall 5.838 ns/op -0.01 ns/op / -0.2% (better)
Linux BenchmarkRuntimeGetG 2.366 ns/op -0.152 ns/op / -6.0% (better)
macOS BenchmarkLookupPCRandom 18.980 ns/op -0.26 ns/op / -1.4% (better)
macOS BenchmarkMergeCompilerFlags 176 ns/op +23.6 ns/op / +15.5% (worse)
macOS BenchmarkMergeLinkerFlags 110.600 ns/op +5.8 ns/op / +5.5% (worse)
macOS BenchmarkChannelBuffered 29.210 ns/op -4.38 ns/op / -13.0% (better)
macOS BenchmarkChannelHandoff 10131 ns/op -1184 ns/op / -10.5% (better)
macOS BenchmarkDefer 41.500 ns/op -2.41 ns/op / -5.5% (better)
macOS BenchmarkDirectCall 1.274 ns/op +0.042 ns/op / +3.4% (worse)
macOS BenchmarkGlobalRead 1.200 ns/op -0.09 ns/op / -7.0% (better)
macOS BenchmarkGlobalWrite 1.275 ns/op -0.063 ns/op / -4.7% (better)
macOS BenchmarkGoroutine 48739 ns/op +9328 ns/op / +23.7% (worse)
macOS BenchmarkInterfaceCall 4.998 ns/op -0.14 ns/op / -2.7% (better)
macOS BenchmarkRuntimeGetG 2.647 ns/op -0.277 ns/op / -9.5% (better)
Windows MinGW BenchmarkLookupPCRandom 12.630 ns/op -0.57 ns/op / -4.3% (better)
Windows MinGW BenchmarkMergeCompilerFlags 645.900 ns/op +44.9 ns/op / +7.5% (worse)
Windows MinGW BenchmarkMergeLinkerFlags 526.700 ns/op -10.6 ns/op / -2.0% (better)
Windows MinGW BenchmarkChannelBuffered 33.740 ns/op -0.56 ns/op / -1.6% (better)
Windows MinGW BenchmarkChannelHandoff 944.700 ns/op -63.3 ns/op / -6.3% (better)
Windows MinGW BenchmarkDefer 57.280 ns/op +0.96 ns/op / +1.7% (worse)
Windows MinGW BenchmarkDirectCall 1.549 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW BenchmarkGlobalRead 1.549 ns/op -0.003 ns/op / -0.2% (better)
Windows MinGW BenchmarkGlobalWrite 2.456 ns/op +0.001 ns/op / +0.04073% (worse)
Windows MinGW BenchmarkGoroutine 76979 ns/op -7126 ns/op / -8.5% (better)
Windows MinGW BenchmarkInterfaceCall 8.988 ns/op +0.002 ns/op / +0.02226% (worse)
Windows MinGW BenchmarkRuntimeGetG 2.477 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkLookupPCRandom 26.500 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 710.700 ns/op -36.7 ns/op / -4.9% (better)
Windows MinGW 386 BenchmarkMergeLinkerFlags 675.300 ns/op +1.2 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkChannelBuffered 40.090 ns/op -0.1 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkChannelHandoff 1038 ns/op +70.1 ns/op / +7.2% (worse)
Windows MinGW 386 BenchmarkDefer 41.980 ns/op +0.26 ns/op / +0.6% (worse)
Windows MinGW 386 BenchmarkDirectCall 1.548 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkGlobalRead 1.860 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGlobalWrite 7.770 ns/op +0.002 ns/op / +0.02575% (worse)
Windows MinGW 386 BenchmarkGoroutine 86265 ns/op +508 ns/op / +0.6% (worse)
Windows MinGW 386 BenchmarkInterfaceCall 8.394 ns/op +0.034 ns/op / +0.4% (worse)
Windows MinGW 386 BenchmarkRuntimeGetG 2.167 ns/op -0.001 ns/op / -0.04613% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.030 ns/op -0.03 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 570.700 ns/op -6.8 ns/op / -1.2% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 542.500 ns/op +0.7 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 39.430 ns/op +1.41 ns/op / +3.7% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 2308 ns/op +18 ns/op / +0.8% (worse)
Windows MinGW ARM64 BenchmarkDefer 55.490 ns/op -0.61 ns/op / -1.1% (better)
Windows MinGW ARM64 BenchmarkDirectCall 0.590 ns/op -0.0003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.885 ns/op +0.0004 ns/op / +0.04523% (worse)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.589 ns/op -0.0001 ns/op / -0.01697% (better)
Windows MinGW ARM64 BenchmarkGoroutine 58126 ns/op -1713 ns/op / -2.9% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 4.238 ns/op +0.005 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.803 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC BenchmarkLookupPCRandom 12.370 ns/op +0.12 ns/op / +1.0% (worse)
Windows MSVC BenchmarkMergeCompilerFlags 540.500 ns/op -19.6 ns/op / -3.5% (better)
Windows MSVC BenchmarkMergeLinkerFlags 455.700 ns/op -38.1 ns/op / -7.7% (better)
Windows MSVC BenchmarkChannelBuffered 31.970 ns/op +0.07 ns/op / +0.2% (worse)
Windows MSVC BenchmarkChannelHandoff 1268 ns/op -5 ns/op / -0.4% (better)
Windows MSVC BenchmarkDefer 56.830 ns/op +0.73 ns/op / +1.3% (worse)
Windows MSVC BenchmarkDirectCall 1.746 ns/op -0.001 ns/op / -0.1% (better)
Windows MSVC BenchmarkGlobalRead 1.746 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC BenchmarkGlobalWrite 2.788 ns/op -0.001 ns/op / -0.03586% (better)
Windows MSVC BenchmarkGoroutine 63277 ns/op -4061 ns/op / -6.0% (better)
Windows MSVC BenchmarkInterfaceCall 8.456 ns/op +0.049 ns/op / +0.6% (worse)
Windows MSVC BenchmarkRuntimeGetG 2.595 ns/op +0.146 ns/op / +6.0% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 27.770 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 788.800 ns/op +46.7 ns/op / +6.3% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 683.700 ns/op -29.8 ns/op / -4.2% (better)
Windows MSVC 386 BenchmarkChannelBuffered 46.020 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkChannelHandoff 798.800 ns/op -36.3 ns/op / -4.3% (better)
Windows MSVC 386 BenchmarkDefer 49.720 ns/op +0.33 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkDirectCall 1.746 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkGlobalRead 2.096 ns/op -0.001 ns/op / -0.04769% (better)
Windows MSVC 386 BenchmarkGlobalWrite 8.984 ns/op -0.009 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkGoroutine 73625 ns/op +3616 ns/op / +5.2% (worse)
Windows MSVC 386 BenchmarkInterfaceCall 9.444 ns/op +0.088 ns/op / +0.9% (worse)
Windows MSVC 386 BenchmarkRuntimeGetG 2.105 ns/op +0.003 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.090 ns/op +0.02 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 554.800 ns/op +6 ns/op / +1.1% (worse)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 531.900 ns/op +14.2 ns/op / +2.7% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 37.780 ns/op -1.47 ns/op / -3.7% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 2100 ns/op -238 ns/op / -10.2% (better)
Windows MSVC ARM64 BenchmarkDefer 65.010 ns/op +0.11 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkDirectCall 0.589 ns/op -0.0002 ns/op / -0.03392% (better)
Windows MSVC ARM64 BenchmarkGlobalRead 0.664 ns/op +0.0004 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.794 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkGoroutine 54827 ns/op -1384 ns/op / -2.5% (better)
Windows MSVC ARM64 BenchmarkInterfaceCall 4.233 ns/op -0.001 ns/op / -0.02362% (better)
Windows MSVC ARM64 BenchmarkRuntimeGetG 2.190 ns/op -0.07 ns/op / -3.1% (better)

Timer runtime benchmarks

Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 924.600 ns/op +9.8 ns/op / +1.1% (worse)
Linux AfterFuncZeroDelivery/LLGo 40931 ns/op +7129 ns/op / +21.1% (worse)
Linux CreateStop/Go 292.900 ns/op +2.5 ns/op / +0.9% (worse)
Linux CreateStop/LLGo 1746 ns/op +148 ns/op / +9.3% (worse)
Linux RearmStopped/Go 116 ns/op -2.8 ns/op / -2.4% (better)
Linux RearmStopped/LLGo 1313 ns/op +36 ns/op / +2.8% (worse)
Linux ResetActive/Go 72.480 ns/op +3.16 ns/op / +4.6% (worse)
Linux ResetActive/LLGo 726.900 ns/op -19.6 ns/op / -2.6% (better)
Linux ResetHeap1024/Go 67.220 ns/op -0.06 ns/op / -0.1% (better)
Linux ResetHeap1024/LLGo 178.600 ns/op +0.6 ns/op / +0.3% (worse)
macOS AfterFuncZeroDelivery/Go 479.900 ns/op -65.7 ns/op / -12.0% (better)
macOS AfterFuncZeroDelivery/LLGo 88000 ns/op -7418 ns/op / -7.8% (better)
macOS CreateStop/Go 214.600 ns/op -3.5 ns/op / -1.6% (better)
macOS CreateStop/LLGo 868.900 ns/op +344.8 ns/op / +65.8% (worse)
macOS RearmStopped/Go 68.960 ns/op -12.26 ns/op / -15.1% (better)
macOS RearmStopped/LLGo 341.800 ns/op -121 ns/op / -26.1% (better)
macOS ResetActive/Go 51.580 ns/op -11.48 ns/op / -18.2% (better)
macOS ResetActive/LLGo 165.800 ns/op +2.5 ns/op / +1.5% (worse)
macOS ResetHeap1024/Go 47.160 ns/op -8.99 ns/op / -16.0% (better)
macOS ResetHeap1024/LLGo 90.350 ns/op -0.37 ns/op / -0.4% (better)
Windows MinGW AfterFuncZeroDelivery/Go 552.800 ns/op -13.7 ns/op / -2.4% (better)
Windows MinGW AfterFuncZeroDelivery/LLGo 161375 ns/op -422 ns/op / -0.3% (better)
Windows MinGW CreateStop/Go 115.200 ns/op +0.5 ns/op / +0.4% (worse)
Windows MinGW CreateStop/LLGo 453.800 ns/op -4.2 ns/op / -0.9% (better)
Windows MinGW RearmStopped/Go 31.420 ns/op -0.09 ns/op / -0.3% (better)
Windows MinGW RearmStopped/LLGo 263.800 ns/op -5.1 ns/op / -1.9% (better)
Windows MinGW ResetActive/Go 20.110 ns/op +0.06 ns/op / +0.3% (worse)
Windows MinGW ResetActive/LLGo 201.300 ns/op +33.8 ns/op / +20.2% (worse)
Windows MinGW ResetHeap1024/Go 20.440 ns/op +0.04 ns/op / +0.2% (worse)
Windows MinGW ResetHeap1024/LLGo 122.600 ns/op +2.5 ns/op / +2.1% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 958 ns/op -2.4 ns/op / -0.2% (better)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 196422 ns/op +1222 ns/op / +0.6% (worse)
Windows MinGW 386 CreateStop/Go 189.700 ns/op -3.5 ns/op / -1.8% (better)
Windows MinGW 386 CreateStop/LLGo 1944 ns/op +68 ns/op / +3.6% (worse)
Windows MinGW 386 RearmStopped/Go 63.240 ns/op -0.31 ns/op / -0.5% (better)
Windows MinGW 386 RearmStopped/LLGo 339.900 ns/op -7.7 ns/op / -2.2% (better)
Windows MinGW 386 ResetActive/Go 38.950 ns/op -0.19 ns/op / -0.5% (better)
Windows MinGW 386 ResetActive/LLGo 1029 ns/op -24 ns/op / -2.3% (better)
Windows MinGW 386 ResetHeap1024/Go 39.350 ns/op -0.27 ns/op / -0.7% (better)
Windows MinGW 386 ResetHeap1024/LLGo 186.300 ns/op +0.8 ns/op / +0.4% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 669 ns/op +1.7 ns/op / +0.3% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 130338 ns/op +1763 ns/op / +1.4% (worse)
Windows MinGW ARM64 CreateStop/Go 196.100 ns/op -6.7 ns/op / -3.3% (better)
Windows MinGW ARM64 CreateStop/LLGo 361.300 ns/op -5.3 ns/op / -1.4% (better)
Windows MinGW ARM64 RearmStopped/Go 70.540 ns/op -0.01 ns/op / -0.01417% (better)
Windows MinGW ARM64 RearmStopped/LLGo 252.900 ns/op +0.7 ns/op / +0.3% (worse)
Windows MinGW ARM64 ResetActive/Go 31.130 ns/op +0.01 ns/op / +0.03213% (worse)
Windows MinGW ARM64 ResetActive/LLGo 127.100 ns/op +3.1 ns/op / +2.5% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.180 ns/op +0.01 ns/op / +0.03208% (worse)
Windows MinGW ARM64 ResetHeap1024/LLGo 126.500 ns/op +0.2 ns/op / +0.2% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 562.400 ns/op +89.3 ns/op / +18.9% (worse)
Windows MSVC AfterFuncZeroDelivery/LLGo 133236 ns/op -1041 ns/op / -0.8% (better)
Windows MSVC CreateStop/Go 116.400 ns/op -1.5 ns/op / -1.3% (better)
Windows MSVC CreateStop/LLGo 455.600 ns/op +1.5 ns/op / +0.3% (worse)
Windows MSVC RearmStopped/Go 31.520 ns/op -0.11 ns/op / -0.3% (better)
Windows MSVC RearmStopped/LLGo 287.500 ns/op +10.7 ns/op / +3.9% (worse)
Windows MSVC ResetActive/Go 19.280 ns/op +0.2 ns/op / +1.0% (worse)
Windows MSVC ResetActive/LLGo 158.500 ns/op -0.4 ns/op / -0.3% (better)
Windows MSVC ResetHeap1024/Go 19.050 ns/op -0.03 ns/op / -0.2% (better)
Windows MSVC ResetHeap1024/LLGo 129.700 ns/op +0.2 ns/op / +0.2% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 995.800 ns/op +13.9 ns/op / +1.4% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 157389 ns/op +3733 ns/op / +2.4% (worse)
Windows MSVC 386 CreateStop/Go 218.400 ns/op +2.1 ns/op / +1.0% (worse)
Windows MSVC 386 CreateStop/LLGo 2221 ns/op -29 ns/op / -1.3% (better)
Windows MSVC 386 RearmStopped/Go 73.220 ns/op +0.18 ns/op / +0.2% (worse)
Windows MSVC 386 RearmStopped/LLGo 342.300 ns/op -10.6 ns/op / -3.0% (better)
Windows MSVC 386 ResetActive/Go 41.990 ns/op -0.02 ns/op / -0.04761% (better)
Windows MSVC 386 ResetActive/LLGo 1031 ns/op +118.9 ns/op / +13.0% (worse)
Windows MSVC 386 ResetHeap1024/Go 42.240 ns/op +0.03 ns/op / +0.1% (worse)
Windows MSVC 386 ResetHeap1024/LLGo 181.900 ns/op +0.8 ns/op / +0.4% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 660.900 ns/op -3.6 ns/op / -0.5% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 124670 ns/op -5937 ns/op / -4.5% (better)
Windows MSVC ARM64 CreateStop/Go 200.400 ns/op +2.6 ns/op / +1.3% (worse)
Windows MSVC ARM64 CreateStop/LLGo 391.700 ns/op +15.1 ns/op / +4.0% (worse)
Windows MSVC ARM64 RearmStopped/Go 70.630 ns/op +0.01 ns/op / +0.01416% (worse)
Windows MSVC ARM64 RearmStopped/LLGo 276.400 ns/op -1.4 ns/op / -0.5% (better)
Windows MSVC ARM64 ResetActive/Go 30.950 ns/op -0.06 ns/op / -0.2% (better)
Windows MSVC ARM64 ResetActive/LLGo 133.700 ns/op -6.4 ns/op / -4.6% (better)
Windows MSVC ARM64 ResetHeap1024/Go 31.070 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC ARM64 ResetHeap1024/LLGo 136.400 ns/op +0.3 ns/op / +0.2% (worse)

Compared with 38463561e6f3 measured in the same runner job.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant