Skip to content

feat(structs): add explicit storage alignment markers - #3029

Closed
zhouguangyuan0718 wants to merge 7 commits into
mainfrom
codex/explicit-alignment
Closed

zhouguangyuan0718 wants to merge 7 commits into
mainfrom
codex/explicit-alignment

Conversation

@zhouguangyuan0718

@zhouguangyuan0718 zhouguangyuan0718 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Add LLGo extensions structs.Align8, Align16, Align32, and Align64 for zero-sized alignment fields. For example, struct { _ structs.Align16; Data [24]byte } has alignment 16, size 32, and data offset 0. Requirements propagate through value fields and arrays, compose with HostLayout, and remain independent of SIMD representation.

Connect source layout, LLVM storage, allocation alignment, reflection metadata, and DWARF. Migrate 32-bit memory-profile counter storage to structs.Align8, retaining the existing fallback for other Go compilers and older toolchains. Load source-patched packages without requesting unused gc export data, so the metadata driver does not reject LLGo-only public declarations before LLGo type checking.

Validate native signatures, callbacks, exports, and concrete C varargs before LLVM lowering, returning positioned compilation errors without package-level panic recovery.

The initial implementation rejects map keys/values aligned above 8 bytes and explicitly aligned native by-value arguments/results, including C varargs. Pointers remain supported; libffi reflection calls still reject alignment above 8 bytes. These markers are LLGo extensions, not APIs provided by other Go compilers.

Validation:

  • Layout and IR checks across eight target configurations, plus alias/generic/nested storage and boundary diagnostics. Memory-profile bucket alignment, stride, marker selection, and allocation-free atomic updates are checked on Windows/386 and Linux/386, ARM, and MIPS.
  • Native allocation/reflection tests, large returns/defer captures, existing structs tests, and C pointer layout/read-write checks.
  • Emscripten/Node execution of the C interoperability fixture; package-loader, source-overlay, and cache regressions passed.

Other targets received layout/IR checks, not native runtime qualification.

@fennoai fennoai Bot 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.

Review: explicit alignment markers (structs.Align8/16/32/64)

This is a well-engineered, carefully-tested change. It generalizes the existing SIMD/vector layout machinery to also serve user-requested explicit alignment, and the soundness-critical paths are all covered:

  • Storage alignment is propagated through stack, global, heap (new() → aligned allocator), slice growth, interface boxes, channel buffers, and reflection allocations, with direct test coverage in ssa/alignment_test.go, internal/build/alignment_test.go, and test/go/explicit_alignment_llgo_test.go.
  • requiredExplicitAlignment recursion terminates: it follows only by-value storage (array/struct/tuple), never pointers/slices/maps/chans, so recursive Go types cannot loop.
  • The panic/recover in cl/compile.go converts only *llssa.AlignmentError to a returned error and re-panics everything else, so unrelated panics are not masked.
  • Integer casts for DWARF (debugAlignof → uint32(... * 8)) are bounded by 64 bytes (512 bits), well within range.
  • The NeedExportFile mode change (build.go/load.go) is sound: llgo type-checks the patched source itself, so skipping cmd/go export-data compilation for packages with added public declarations does not weaken type safety, and the cache-key fallback keeps output identity correct.

I reviewed across code quality, performance, security/soundness, and documentation accuracy. No correctness, security, performance, or documentation defects were found. The documentation (README + package doc + updated comments) matches the implemented behavior and test expectations.

Below are a few small, non-blocking suggestions. Everything here is optional.

Comment thread internal/packages/load.go
// before our initial check.
// Explicit export-data requests and ordinary loads keep their contract.
if dedup == nil || dedup.rewrite == nil {
if dedup == nil || dedup.rewrite == nil && len(dedup.llgoFiles) == 0 {

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.

Nit (readability): dedup == nil || dedup.rewrite == nil && len(dedup.llgoFiles) == 0 mixes || and && without parentheses. The precedence is correct (&& binds tighter, so it reads as dedup == nil || (dedup.rewrite == nil && len(dedup.llgoFiles) == 0)), but this is the only unparenthesized mix of the two operators in the diff. Adding explicit parentheses would guard against a future editing mistake:

if dedup == nil || (dedup.rewrite == nil && len(dedup.llgoFiles) == 0) {

Comment thread ssa/expr.go
if ll.IsFunctionVarArg() {
for _, arg := range args {
if requiredExplicitAlignment(arg.raw.Type) != 0 {
panic(&AlignmentError{Pos: sig.Params().At(sig.Params().Len() - 1).Pos(), Type: arg.raw.Type})

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.

The vararg path reports the __llgo_va_list parameter's position rather than the offending argument's position (the fixed param/result path in type.go uses the exact tuple.At(i).Pos()). This is a reasonable fallback since ellipsis actuals have no declaration slot / token.Pos, but the choice isn't obvious at the call site. Consider a one-line comment noting the va_list parameter position is used deliberately because the offending actual has no source position — the existing comment above explains why the check is here but not why this Pos.

Comment thread ssa/type.go
@@ -713,6 +717,19 @@ func (p Program) toNamed(raw *types.Named) Type {
break
}

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.

This explicit-alignment carrier block is near-identical to the SIMD block just below (both do StructCreateNamed → StructSetBody([]llvm.Type{carrier}, false) → &aType{ll, rawType{raw}, vkStruct} → p.named[name] = typ, differing only in the alignment source). A small shared helper (e.g. p.alignmentCarrierStruct(name, raw, n)) would collapse the duplicated construction to a one-line difference and reduce the chance the two paths drift. Optional.

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

LLGo baseline benchmarks

d9f14bea757d | workflow run | long-term charts

String equality benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkStringEquality/bytes/equal/1024/Go 26.010 ns/op +0.19 ns/op / +0.7% (worse)
Linux BenchmarkStringEquality/bytes/equal/1024/LLGo 63.310 ns/op -0.83 ns/op / -1.3% (better)
Linux BenchmarkStringEquality/bytes/equal/128/Go 8.440 ns/op +0.069 ns/op / +0.8% (worse)
Linux BenchmarkStringEquality/bytes/equal/128/LLGo 12.040 ns/op +0.05 ns/op / +0.4% (worse)
Linux BenchmarkStringEquality/bytes/equal/8/Go 5.850 ns/op +0.01 ns/op / +0.2% (worse)
Linux BenchmarkStringEquality/bytes/equal/8/LLGo 4.702 ns/op +0.046 ns/op / +1.0% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/Go 6.696 ns/op +0.073 ns/op / +1.1% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/LLGo 3.500 ns/op +0.382 ns/op / +12.3% (worse)
Linux BenchmarkStringEquality/bytes/first/128/Go 6.623 ns/op -0.028 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/bytes/first/128/LLGo 3.513 ns/op +0.39 ns/op / +12.5% (worse)
Linux BenchmarkStringEquality/bytes/first/8/Go 5.822 ns/op 0 ns/op / +0.0%
Linux BenchmarkStringEquality/bytes/first/8/LLGo 3.542 ns/op +0.432 ns/op / +13.9% (worse)
Linux BenchmarkStringEquality/bytes/last/1024/Go 25.120 ns/op 0 ns/op / +0.0%
Linux BenchmarkStringEquality/bytes/last/1024/LLGo 63.500 ns/op -0.12 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/bytes/last/128/Go 8.161 ns/op -0.007 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/bytes/last/128/LLGo 11.830 ns/op -0.01 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/bytes/last/8/Go 5.823 ns/op -0.01 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/bytes/last/8/LLGo 4.687 ns/op +0.806 ns/op / +20.8% (worse)
Linux BenchmarkStringEquality/strings/equal/1024/Go 23.490 ns/op +0.25 ns/op / +1.1% (worse)
Linux BenchmarkStringEquality/strings/equal/1024/LLGo 56.170 ns/op -0.59 ns/op / -1.0% (better)
Linux BenchmarkStringEquality/strings/equal/128/Go 8.391 ns/op +0.194 ns/op / +2.4% (worse)
Linux BenchmarkStringEquality/strings/equal/128/LLGo 11.940 ns/op -0.28 ns/op / -2.3% (better)
Linux BenchmarkStringEquality/strings/equal/8/Go 5.847 ns/op -0.003 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/equal/8/LLGo 3.932 ns/op -0.351 ns/op / -8.2% (better)
Linux BenchmarkStringEquality/strings/first/1024/Go 6.782 ns/op +0.18 ns/op / +2.7% (worse)
Linux BenchmarkStringEquality/strings/first/1024/LLGo 2.730 ns/op -0.075 ns/op / -2.7% (better)
Linux BenchmarkStringEquality/strings/first/128/Go 6.600 ns/op -0.058 ns/op / -0.9% (better)
Linux BenchmarkStringEquality/strings/first/128/LLGo 2.720 ns/op +0.001 ns/op / +0.03678% (worse)
Linux BenchmarkStringEquality/strings/first/8/Go 5.836 ns/op +0.015 ns/op / +0.3% (worse)
Linux BenchmarkStringEquality/strings/first/8/LLGo 2.728 ns/op +0.002 ns/op / +0.1% (worse)
Linux BenchmarkStringEquality/strings/last/1024/Go 22.760 ns/op +0.14 ns/op / +0.6% (worse)
Linux BenchmarkStringEquality/strings/last/1024/LLGo 56.090 ns/op -0.35 ns/op / -0.6% (better)
Linux BenchmarkStringEquality/strings/last/128/Go 8.151 ns/op +0.001 ns/op / +0.01227% (worse)
Linux BenchmarkStringEquality/strings/last/128/LLGo 11.750 ns/op +0.04 ns/op / +0.3% (worse)
Linux BenchmarkStringEquality/strings/last/8/Go 5.825 ns/op -0.006 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/last/8/LLGo 3.505 ns/op +0.003 ns/op / +0.1% (worse)
macOS BenchmarkStringEquality/bytes/equal/1024/Go 20.680 ns/op -1.06 ns/op / -4.9% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/LLGo 19.850 ns/op -1.91 ns/op / -8.8% (better)
macOS BenchmarkStringEquality/bytes/equal/128/Go 5.363 ns/op +0.124 ns/op / +2.4% (worse)
macOS BenchmarkStringEquality/bytes/equal/128/LLGo 3.720 ns/op -0.274 ns/op / -6.9% (better)
macOS BenchmarkStringEquality/bytes/equal/8/Go 3.816 ns/op -0.277 ns/op / -6.8% (better)
macOS BenchmarkStringEquality/bytes/equal/8/LLGo 2.592 ns/op -0.445 ns/op / -14.7% (better)
macOS BenchmarkStringEquality/bytes/first/1024/Go 3.358 ns/op -0.029 ns/op / -0.9% (better)
macOS BenchmarkStringEquality/bytes/first/1024/LLGo 1.723 ns/op -0.334 ns/op / -16.2% (better)
macOS BenchmarkStringEquality/bytes/first/128/Go 3.356 ns/op -0.182 ns/op / -5.1% (better)
macOS BenchmarkStringEquality/bytes/first/128/LLGo 1.722 ns/op -0.283 ns/op / -14.1% (better)
macOS BenchmarkStringEquality/bytes/first/8/Go 3.205 ns/op -0.412 ns/op / -11.4% (better)
macOS BenchmarkStringEquality/bytes/first/8/LLGo 1.720 ns/op -0.47 ns/op / -21.5% (better)
macOS BenchmarkStringEquality/bytes/last/1024/Go 20.390 ns/op -0.97 ns/op / -4.5% (better)
macOS BenchmarkStringEquality/bytes/last/1024/LLGo 19.410 ns/op -4.66 ns/op / -19.4% (better)
macOS BenchmarkStringEquality/bytes/last/128/Go 4.592 ns/op -0.233 ns/op / -4.8% (better)
macOS BenchmarkStringEquality/bytes/last/128/LLGo 3.299 ns/op -0.652 ns/op / -16.5% (better)
macOS BenchmarkStringEquality/bytes/last/8/Go 3.610 ns/op +0.099 ns/op / +2.8% (worse)
macOS BenchmarkStringEquality/bytes/last/8/LLGo 2.289 ns/op -0.211 ns/op / -8.4% (better)
macOS BenchmarkStringEquality/strings/equal/1024/Go 20.730 ns/op -1.22 ns/op / -5.6% (better)
macOS BenchmarkStringEquality/strings/equal/1024/LLGo 19.840 ns/op -2.58 ns/op / -11.5% (better)
macOS BenchmarkStringEquality/strings/equal/128/Go 5.373 ns/op +0.116 ns/op / +2.2% (worse)
macOS BenchmarkStringEquality/strings/equal/128/LLGo 3.747 ns/op -0.442 ns/op / -10.6% (better)
macOS BenchmarkStringEquality/strings/equal/8/Go 3.870 ns/op +0.019 ns/op / +0.5% (worse)
macOS BenchmarkStringEquality/strings/equal/8/LLGo 2.600 ns/op -0.207 ns/op / -7.4% (better)
macOS BenchmarkStringEquality/strings/first/1024/Go 3.358 ns/op -0.238 ns/op / -6.6% (better)
macOS BenchmarkStringEquality/strings/first/1024/LLGo 1.721 ns/op -0.252 ns/op / -12.8% (better)
macOS BenchmarkStringEquality/strings/first/128/Go 3.688 ns/op +0.15 ns/op / +4.2% (worse)
macOS BenchmarkStringEquality/strings/first/128/LLGo 1.719 ns/op -0.371 ns/op / -17.8% (better)
macOS BenchmarkStringEquality/strings/first/8/Go 3.499 ns/op -0.064 ns/op / -1.8% (better)
macOS BenchmarkStringEquality/strings/first/8/LLGo 1.719 ns/op -0.122 ns/op / -6.6% (better)
macOS BenchmarkStringEquality/strings/last/1024/Go 21.170 ns/op -1.2 ns/op / -5.4% (better)
macOS BenchmarkStringEquality/strings/last/1024/LLGo 19.350 ns/op -5.75 ns/op / -22.9% (better)
macOS BenchmarkStringEquality/strings/last/128/Go 4.589 ns/op -0.227 ns/op / -4.7% (better)
macOS BenchmarkStringEquality/strings/last/128/LLGo 3.284 ns/op -0.154 ns/op / -4.5% (better)
macOS BenchmarkStringEquality/strings/last/8/Go 3.503 ns/op -0.093 ns/op / -2.6% (better)
macOS BenchmarkStringEquality/strings/last/8/LLGo 2.290 ns/op -0.367 ns/op / -13.8% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/Go 17.020 ns/op +0.11 ns/op / +0.7% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/LLGo 34.980 ns/op +0.13 ns/op / +0.4% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/Go 5.787 ns/op +0.102 ns/op / +1.8% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/LLGo 8.727 ns/op -0.207 ns/op / -2.3% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/Go 4.685 ns/op -1.07 ns/op / -18.6% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/LLGo 3.794 ns/op +0.003 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/Go 4.958 ns/op +0.246 ns/op / +5.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/LLGo 2.984 ns/op +0.006 ns/op / +0.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/128/Go 4.998 ns/op -0.044 ns/op / -0.9% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/128/LLGo 2.984 ns/op +0.002 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/Go 4.967 ns/op +0.047 ns/op / +1.0% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/LLGo 2.978 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkStringEquality/bytes/last/1024/Go 16.540 ns/op +0.08 ns/op / +0.5% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/LLGo 34.810 ns/op +0.06 ns/op / +0.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/128/Go 5.173 ns/op -0.289 ns/op / -5.3% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/128/LLGo 8.763 ns/op +0.219 ns/op / +2.6% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/Go 4.938 ns/op +0.063 ns/op / +1.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/LLGo 3.249 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkStringEquality/strings/equal/1024/Go 15.690 ns/op +0.17 ns/op / +1.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/LLGo 31.400 ns/op +0.52 ns/op / +1.7% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/Go 6.292 ns/op +0.016 ns/op / +0.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/LLGo 7.090 ns/op +0.013 ns/op / +0.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/8/Go 5.103 ns/op +0.2 ns/op / +4.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/8/LLGo 2.709 ns/op -0.001 ns/op / -0.0369% (better)
Windows MinGW BenchmarkStringEquality/strings/first/1024/Go 4.920 ns/op +0.24 ns/op / +5.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/1024/LLGo 1.895 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/strings/first/128/Go 5.726 ns/op +0.019 ns/op / +0.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/128/LLGo 1.896 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/8/Go 4.658 ns/op -0.039 ns/op / -0.8% (better)
Windows MinGW BenchmarkStringEquality/strings/first/8/LLGo 1.899 ns/op +0.003 ns/op / +0.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/1024/Go 14.670 ns/op +0.09 ns/op / +0.6% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/1024/LLGo 30.850 ns/op -0.01 ns/op / -0.0324% (better)
Windows MinGW BenchmarkStringEquality/strings/last/128/Go 5.467 ns/op -0.813 ns/op / -12.9% (better)
Windows MinGW BenchmarkStringEquality/strings/last/128/LLGo 6.865 ns/op +0.076 ns/op / +1.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/Go 4.948 ns/op -0.758 ns/op / -13.3% (better)
Windows MinGW BenchmarkStringEquality/strings/last/8/LLGo 2.166 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/Go 32.500 ns/op +1.56 ns/op / +5.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 34.380 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/Go 10.100 ns/op -0.03 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/LLGo 8.242 ns/op +0.029 ns/op / +0.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/Go 7.321 ns/op -0.072 ns/op / -1.0% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/LLGo 5.247 ns/op -0.157 ns/op / -2.9% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/Go 8.092 ns/op +0.022 ns/op / +0.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.979 ns/op -0.005 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/Go 8.017 ns/op -0.008 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.988 ns/op +0.006 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/Go 7.002 ns/op +0.09 ns/op / +1.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/LLGo 4.059 ns/op +0.019 ns/op / +0.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/Go 31.460 ns/op +1.24 ns/op / +4.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/LLGo 33.460 ns/op -0.2 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/Go 9.491 ns/op -0.059 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/LLGo 7.487 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/Go 7.469 ns/op +0.077 ns/op / +1.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/LLGo 4.517 ns/op -0.032 ns/op / -0.7% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/Go 30.640 ns/op +1.97 ns/op / +6.9% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/LLGo 33.740 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/Go 9.511 ns/op -0.036 ns/op / -0.4% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/LLGo 8.150 ns/op +0.097 ns/op / +1.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/Go 7.999 ns/op +0.59 ns/op / +8.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/LLGo 4.939 ns/op -0.041 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/Go 7.773 ns/op +0.051 ns/op / +0.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.981 ns/op -0.007 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/Go 7.850 ns/op +0.119 ns/op / +1.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/LLGo 4.022 ns/op +0.047 ns/op / +1.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/Go 6.858 ns/op +0.007 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/LLGo 4.098 ns/op +0.097 ns/op / +2.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/Go 30.730 ns/op +2.46 ns/op / +8.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/LLGo 33.100 ns/op -0.05 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/Go 9.071 ns/op -0.019 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/LLGo 7.809 ns/op +0.189 ns/op / +2.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/Go 7.096 ns/op -0.11 ns/op / -1.5% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/LLGo 4.582 ns/op +0.026 ns/op / +0.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.460 ns/op +0.29 ns/op / +0.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 40.310 ns/op +0.07 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.796 ns/op +0.13 ns/op / +2.0% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.417 ns/op -0.043 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.746 ns/op +0.013 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.847 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.714 ns/op -0.026 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.892 ns/op -0.186 ns/op / -9.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.832 ns/op +0.011 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.875 ns/op +0.011 ns/op / +0.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.413 ns/op -0.025 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 2.033 ns/op +0.145 ns/op / +7.7% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.240 ns/op +0.3 ns/op / +1.0% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 39.730 ns/op -0.13 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.710 ns/op -0.041 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.951 ns/op -0.099 ns/op / -1.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.562 ns/op +0.091 ns/op / +2.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.659 ns/op +0.199 ns/op / +8.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.440 ns/op -0.04 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.560 ns/op -0.2 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.061 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 6.065 ns/op -0.006 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.948 ns/op -0.024 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.505 ns/op +0.004 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.515 ns/op -0.089 ns/op / -1.9% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.748 ns/op +0.17 ns/op / +10.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/Go 4.554 ns/op +0.019 ns/op / +0.4% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.578 ns/op -0.097 ns/op / -5.8% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/Go 3.962 ns/op +0.061 ns/op / +1.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.572 ns/op -0.048 ns/op / -3.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.120 ns/op +0.01 ns/op / +0.03689% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.880 ns/op -0.54 ns/op / -1.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/Go 5.925 ns/op +0.013 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.660 ns/op -0.05 ns/op / -0.9% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/Go 3.879 ns/op -0.001 ns/op / -0.02577% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.187 ns/op -0.018 ns/op / -0.8% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/Go 20.170 ns/op -0.85 ns/op / -4.0% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/LLGo 41.550 ns/op -0.41 ns/op / -1.0% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/Go 8.465 ns/op +0.977 ns/op / +13.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/LLGo 10.750 ns/op -0.21 ns/op / -1.9% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/Go 5.991 ns/op +0.062 ns/op / +1.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/LLGo 4.733 ns/op +0.034 ns/op / +0.7% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/Go 5.961 ns/op -0.311 ns/op / -5.0% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/LLGo 3.732 ns/op +0.019 ns/op / +0.5% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/128/Go 5.936 ns/op -0.049 ns/op / -0.8% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/128/LLGo 3.709 ns/op +0.001 ns/op / +0.02697% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/Go 6.900 ns/op +0.961 ns/op / +16.2% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/LLGo 3.744 ns/op +0.025 ns/op / +0.7% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/Go 19.640 ns/op +0.17 ns/op / +0.9% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/LLGo 41.120 ns/op -2.86 ns/op / -6.5% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/128/Go 6.553 ns/op -0.101 ns/op / -1.5% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/128/LLGo 10.970 ns/op +0.28 ns/op / +2.6% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/8/Go 5.904 ns/op -0.025 ns/op / -0.4% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/8/LLGo 4.506 ns/op +0.172 ns/op / +4.0% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/Go 20.170 ns/op +0.06 ns/op / +0.3% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/LLGo 39.370 ns/op +0.07 ns/op / +0.2% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/128/Go 7.518 ns/op -0.096 ns/op / -1.3% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/LLGo 7.721 ns/op -0.081 ns/op / -1.0% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/8/Go 5.977 ns/op -0.388 ns/op / -6.1% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/8/LLGo 3.590 ns/op +0.163 ns/op / +4.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/1024/Go 5.946 ns/op -0.118 ns/op / -1.9% (better)
Windows MSVC BenchmarkStringEquality/strings/first/1024/LLGo 2.787 ns/op +0.007 ns/op / +0.3% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/128/Go 5.936 ns/op -0.035 ns/op / -0.6% (better)
Windows MSVC BenchmarkStringEquality/strings/first/128/LLGo 2.777 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC BenchmarkStringEquality/strings/first/8/Go 5.897 ns/op -0.032 ns/op / -0.5% (better)
Windows MSVC BenchmarkStringEquality/strings/first/8/LLGo 2.812 ns/op -0.026 ns/op / -0.9% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/Go 19.450 ns/op -0.05 ns/op / -0.3% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/LLGo 38.850 ns/op +0.14 ns/op / +0.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/128/Go 7.514 ns/op +0.842 ns/op / +12.6% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/128/LLGo 7.755 ns/op -0.073 ns/op / -0.9% (better)
Windows MSVC BenchmarkStringEquality/strings/last/8/Go 5.877 ns/op -0.081 ns/op / -1.4% (better)
Windows MSVC BenchmarkStringEquality/strings/last/8/LLGo 3.419 ns/op +0.025 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/Go 33.050 ns/op +0.29 ns/op / +0.9% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 93.890 ns/op -0.38 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/Go 10.190 ns/op +0.14 ns/op / +1.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/LLGo 19.880 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/Go 7.189 ns/op -0.037 ns/op / -0.5% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/LLGo 5.423 ns/op +0.036 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/Go 8.139 ns/op +0.292 ns/op / +3.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/LLGo 4.018 ns/op -0.017 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/Go 7.579 ns/op -0.254 ns/op / -3.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/LLGo 4.053 ns/op -0.047 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/Go 5.649 ns/op +0.027 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/LLGo 4.092 ns/op +0.059 ns/op / +1.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/Go 31.780 ns/op -0.11 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/LLGo 92.820 ns/op -0.74 ns/op / -0.8% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/Go 8.907 ns/op -0.099 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/LLGo 19.060 ns/op -0.04 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/Go 7.031 ns/op +0.047 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/LLGo 4.914 ns/op -0.017 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/Go 29.050 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/LLGo 93.210 ns/op -0.41 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/Go 10.040 ns/op +0.309 ns/op / +3.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/LLGo 19.570 ns/op +0.24 ns/op / +1.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/Go 7.876 ns/op +0.203 ns/op / +2.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/LLGo 5.207 ns/op +0.058 ns/op / +1.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/Go 7.076 ns/op +0.188 ns/op / +2.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.969 ns/op -0.168 ns/op / -4.1% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/Go 6.926 ns/op +0.009 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/LLGo 4.020 ns/op -0.878 ns/op / -17.9% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/Go 5.539 ns/op +0.021 ns/op / +0.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/LLGo 3.985 ns/op -0.013 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/Go 26.260 ns/op -0.15 ns/op / -0.6% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/LLGo 91.970 ns/op -0.37 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/Go 8.907 ns/op +0.577 ns/op / +6.9% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/LLGo 19.350 ns/op +0.27 ns/op / +1.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/Go 7.305 ns/op +0.148 ns/op / +2.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/LLGo 5.003 ns/op -0.118 ns/op / -2.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.150 ns/op -0.14 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 39.930 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.697 ns/op -0.019 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.488 ns/op +0.017 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.695 ns/op -0.016 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.767 ns/op -0.004 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.714 ns/op -0.042 ns/op / -0.9% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.740 ns/op -0.055 ns/op / -3.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.720 ns/op -0.033 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.842 ns/op +0.098 ns/op / +5.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.542 ns/op -0.006 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.749 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.040 ns/op -0.01 ns/op / -0.03221% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 39.850 ns/op -0.3 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.730 ns/op +0.032 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 7.150 ns/op +0.008 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.543 ns/op +0.102 ns/op / +3.0% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.425 ns/op +0.051 ns/op / +2.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.450 ns/op -0.01 ns/op / -0.03642% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.270 ns/op +0.02 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.054 ns/op -0.005 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 6.035 ns/op -0.051 ns/op / -0.8% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.909 ns/op -0.055 ns/op / -1.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.659 ns/op -0.016 ns/op / -0.6% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.483 ns/op -0.019 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.692 ns/op +0.061 ns/op / +3.7% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/Go 4.545 ns/op -0.015 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.577 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/Go 3.880 ns/op -0.032 ns/op / -0.8% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.619 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.150 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.760 ns/op -0.32 ns/op / -0.9% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/Go 5.909 ns/op -0.014 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.726 ns/op +0.032 ns/op / +0.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/Go 3.866 ns/op -0.066 ns/op / -1.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.167 ns/op +0.065 ns/op / +3.1% (worse)

Program measurements

Platform Workload File size vs base Text size vs base Build vs base Run vs base
Linux cprintf 8576 B 0 B / +0.0% 387 B 0 B / +0.0% 1.265 s +6.193 ms / +0.5% (worse) 1.329 ms -29.86 us / -2.2% (better)
Linux cprintf-lto 8240 B 0 B / +0.0% 368 B 0 B / +0.0% 1.201 s -36.57 ms / -3.0% (better) 1.344 ms +22.64 us / +1.7% (worse)
Linux fmtprintf 1940760 B -64 B / -0.003298% (better) 268554 B 0 B / +0.0% 7.630 s -331.5 ms / -4.2% (better) 3.203 ms -527 us / -14.1% (better)
Linux fmtprintf-lto 1017600 B -32 B / -0.003145% (better) 209822 B 0 B / +0.0% 16.922 s -2.462 s / -12.7% (better) 3.357 ms -691.3 us / -17.1% (better)
Linux println 259776 B -56 B / -0.02155% (better) 18913 B 0 B / +0.0% 1.250 s -116 ms / -8.5% (better) 2.609 ms +704.6 us / +37.0% (worse)
Linux println-lto 102280 B +16 B / +0.01565% (worse) 15575 B 0 B / +0.0% 1.926 s -241.8 ms / -11.2% (better) 1.620 ms -321 us / -16.5% (better)
macOS cprintf 50960 B +16 B / +0.03141% (worse) 4409 B 0 B / +0.0% 762.129 ms -129.5 ms / -14.5% (better) 2.207 ms -756.5 us / -25.5% (better)
macOS cprintf-lto 50608 B 0 B / +0.0% 161 B 0 B / +0.0% 786.407 ms -49.35 ms / -5.9% (better) 2.120 ms -673.9 us / -24.1% (better)
macOS fmtprintf 1233056 B +592 B / +0.04803% (worse) 674001 B 0 B / +0.0% 3.553 s -1.042 s / -22.7% (better) 4.033 ms -1.757 ms / -30.3% (better)
macOS fmtprintf-lto 871376 B 0 B / +0.0% 520205 B 0 B / +0.0% 6.109 s -209.5 ms / -3.3% (better) 4.517 ms +788.9 us / +21.2% (worse)
macOS println 100704 B +80 B / +0.1% (worse) 26099 B 0 B / +0.0% 696.365 ms -174.5 ms / -20.0% (better) 2.792 ms -357 us / -11.3% (better)
macOS println-lto 85680 B 0 B / +0.0% 22387 B 0 B / +0.0% 834.756 ms -224.7 ms / -21.2% (better) 2.653 ms -940.5 us / -26.2% (better)
Windows MinGW cprintf 741888 B 0 B / +0.0% 4230 B 0 B / +0.0% 1.630 s -88.66 ms / -5.2% (better) 2.843 ms -443.1 us / -13.5% (better)
Windows MinGW cprintf-lto 55808 B 0 B / +0.0% 4182 B 0 B / +0.0% 1.659 s -68.15 ms / -3.9% (better) 2.742 ms -542 us / -16.5% (better)
Windows MinGW fmtprintf 5145088 B 0 B / +0.0% 360294 B -32 B / -0.008881% (better) 5.642 s -42.61 ms / -0.7% (better) 7.862 ms -1.341 ms / -14.6% (better)
Windows MinGW fmtprintf-lto 2767360 B +2048 B / +0.1% (worse) 306630 B +32 B / +0.01044% (worse) 9.148 s -360.4 ms / -3.8% (better) 7.958 ms -77.2 us / -1.0% (better)
Windows MinGW println 804352 B 0 B / +0.0% 27142 B 0 B / +0.0% 1.570 s -167.7 ms / -9.7% (better) 5.093 ms -355.5 us / -6.5% (better)
Windows MinGW println-lto 231936 B 0 B / +0.0% 22470 B 0 B / +0.0% 1.884 s -77.72 ms / -4.0% (better) 4.944 ms -1.071 ms / -17.8% (better)
Windows MinGW 386 cprintf 675840 B -74240 B / -9.9% (better) 5592 B -16878 B / -75.1% (better) 1.972 s +14.36 ms / +0.7% (worse) 5.090 ms -3.584 ms / -41.3% (better)
Windows MinGW 386 cprintf-lto 116224 B -165376 B / -58.7% (better) 5112 B -14426 B / -73.8% (better) 2.022 s -256.5 ms / -11.3% (better) 4.964 ms -3.721 ms / -42.8% (better)
Windows MinGW 386 fmtprintf 4501504 B 0 B / +0.0% 284064 B 0 B / +0.0% 6.838 s +159.6 ms / +2.4% (worse) 12.177 ms +1.074 ms / +9.7% (worse)
Windows MinGW 386 fmtprintf-lto 2894336 B +1024 B / +0.03539% (worse) 256250 B 0 B / +0.0% 11.154 s +467 ms / +4.4% (worse) 12.745 ms +1.568 ms / +14.0% (worse)
Windows MinGW 386 println 734208 B -14848 B / -2.0% (better) 22416 B 0 B / +0.0% 1.983 s -3.406 ms / -0.2% (better) 8.442 ms -890.2 us / -9.5% (better)
Windows MinGW 386 println-lto 280064 B 0 B / +0.0% 19472 B 0 B / +0.0% 2.286 s +36.03 ms / +1.6% (worse) 9.302 ms +923.9 us / +11.0% (worse)
Windows MinGW ARM64 cprintf 750592 B 0 B / +0.0% 4028 B 0 B / +0.0% 2.190 s -65.96 ms / -2.9% (better) 6.617 ms -132.7 us / -2.0% (better)
Windows MinGW ARM64 cprintf-lto 55296 B 0 B / +0.0% 3984 B 0 B / +0.0% 2.190 s -123.9 ms / -5.4% (better) 6.494 ms -502.4 us / -7.2% (better)
Windows MinGW ARM64 fmtprintf 5089280 B +1024 B / +0.02012% (worse) 301096 B +44 B / +0.01462% (worse) 6.607 s -29.28 ms / -0.4% (better) 13.524 ms -919.2 us / -6.4% (better)
Windows MinGW ARM64 fmtprintf-lto 2826752 B +1024 B / +0.03624% (worse) 257472 B +16 B / +0.006215% (worse) 10.264 s -56.61 ms / -0.5% (better) 13.974 ms -1.593 ms / -10.2% (better)
Windows MinGW ARM64 println 811008 B 0 B / +0.0% 25300 B 0 B / +0.0% 2.147 s -153 ms / -6.6% (better) 10.595 ms -1.685 ms / -13.7% (better)
Windows MinGW ARM64 println-lto 236032 B 0 B / +0.0% 21696 B 0 B / +0.0% 2.461 s -85.22 ms / -3.3% (better) 10.549 ms -982.9 us / -8.5% (better)
Windows MSVC cprintf 986112 B 0 B / +0.0% 66003 B 0 B / +0.0% 2.060 s -170.7 ms / -7.7% (better) 3.510 ms -144.9 us / -4.0% (better)
Windows MSVC cprintf-lto 303616 B 0 B / +0.0% 65971 B 0 B / +0.0% 2.053 s +75.83 ms / +3.8% (worse) 3.573 ms +5.1 us / +0.1% (worse)
Windows MSVC fmtprintf 5445120 B +512 B / +0.009404% (worse) 456358 B -32 B / -0.007012% (better) 6.538 s -75.67 ms / -1.1% (better) 11.356 ms +639.5 us / +6.0% (worse)
Windows MSVC fmtprintf-lto 3091456 B +512 B / +0.01656% (worse) 405030 B +32 B / +0.007901% (worse) 10.212 s +30.74 ms / +0.3% (worse) 11.750 ms +768.1 us / +7.0% (worse)
Windows MSVC println 1118720 B 0 B / +0.0% 123286 B 0 B / +0.0% 2.048 s +75.93 ms / +3.8% (worse) 7.374 ms -772.4 us / -9.5% (better)
Windows MSVC println-lto 553984 B 0 B / +0.0% 119286 B 0 B / +0.0% 2.290 s +24.17 ms / +1.1% (worse) 8.672 ms +749.7 us / +9.5% (worse)
Windows MSVC 386 cprintf 583168 B -75776 B / -11.5% (better) 3947 B -17203 B / -81.3% (better) 2.104 s +142.5 ms / +7.3% (worse) 7.006 ms -3.581 ms / -33.8% (better)
Windows MSVC 386 cprintf-lto 56320 B -164864 B / -74.5% (better) 3901 B -15058 B / -79.4% (better) 1.977 s -242.7 ms / -10.9% (better) 7.706 ms -3.292 ms / -29.9% (better)
Windows MSVC 386 fmtprintf 4228608 B +512 B / +0.01211% (worse) 267522 B 0 B / +0.0% 6.756 s +67.64 ms / +1.0% (worse) 14.900 ms +1.026 ms / +7.4% (worse)
Windows MSVC 386 fmtprintf-lto 2706944 B +1536 B / +0.1% (worse) 236001 B 0 B / +0.0% 10.582 s +135.9 ms / +1.3% (worse) 14.528 ms +177.8 us / +1.2% (worse)
Windows MSVC 386 println 644608 B -12288 B / -1.9% (better) 21096 B 0 B / +0.0% 1.889 s -55.1 ms / -2.8% (better) 9.841 ms -331.2 us / -3.3% (better)
Windows MSVC 386 println-lto 219648 B 0 B / +0.0% 18889 B 0 B / +0.0% 2.173 s -60.57 ms / -2.7% (better) 9.933 ms -1.052 ms / -9.6% (better)
Windows MSVC ARM64 cprintf 753152 B 0 B / +0.0% 4240 B 0 B / +0.0% 1.917 s +6.784 ms / +0.4% (worse) 6.392 ms -83 us / -1.3% (better)
Windows MSVC ARM64 cprintf-lto 60928 B 0 B / +0.0% 4140 B 0 B / +0.0% 1.955 s +39.69 ms / +2.1% (worse) 6.576 ms +465.4 us / +7.6% (worse)
Windows MSVC ARM64 fmtprintf 5085696 B +1024 B / +0.02014% (worse) 301444 B +48 B / +0.01593% (worse) 6.176 s +48.04 ms / +0.8% (worse) 15.896 ms +1.406 ms / +9.7% (worse)
Windows MSVC ARM64 fmtprintf-lto 2835456 B +1536 B / +0.1% (worse) 258416 B +16 B / +0.006192% (worse) 9.489 s -82.98 ms / -0.9% (better) 15.084 ms -210.1 us / -1.4% (better)
Windows MSVC ARM64 println 814592 B 0 B / +0.0% 25804 B 0 B / +0.0% 1.923 s +66.42 ms / +3.6% (worse) 11.650 ms +697.5 us / +6.4% (worse)
Windows MSVC ARM64 println-lto 242176 B 0 B / +0.0% 22240 B 0 B / +0.0% 2.163 s +17.21 ms / +0.8% (worse) 11.644 ms +919.5 us / +8.6% (worse)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.550 ns/op -0.66 ns/op / -4.3% (better)
Linux BenchmarkMergeCompilerFlags 208.600 ns/op -3.9 ns/op / -1.8% (better)
Linux BenchmarkMergeLinkerFlags 134.800 ns/op -9.6 ns/op / -6.6% (better)
Linux BenchmarkChannelBuffered 72.010 ns/op +0.05 ns/op / +0.1% (worse)
Linux BenchmarkChannelHandoff 13258 ns/op -908 ns/op / -6.4% (better)
Linux BenchmarkDefer 16.160 ns/op -1.16 ns/op / -6.7% (better)
Linux BenchmarkDirectCall 1.169 ns/op -0.388 ns/op / -24.9% (better)
Linux BenchmarkGlobalRead 1.166 ns/op -0.415 ns/op / -26.2% (better)
Linux BenchmarkGlobalWrite 7.771 ns/op -0.128 ns/op / -1.6% (better)
Linux BenchmarkGoroutine 23563 ns/op -573 ns/op / -2.4% (better)
Linux BenchmarkInterfaceCall 5.466 ns/op +0.718 ns/op / +15.1% (worse)
Linux BenchmarkRuntimeGetG 2.435 ns/op -0.046 ns/op / -1.9% (better)
macOS BenchmarkLookupPCRandom 10.700 ns/op -0.83 ns/op / -7.2% (better)
macOS BenchmarkMergeCompilerFlags 90.180 ns/op -9.1 ns/op / -9.2% (better)
macOS BenchmarkMergeLinkerFlags 59 ns/op -3.94 ns/op / -6.3% (better)
macOS BenchmarkChannelBuffered 24.220 ns/op +0.06 ns/op / +0.2% (worse)
macOS BenchmarkChannelHandoff 6520 ns/op -2603 ns/op / -28.5% (better)
macOS BenchmarkDefer 11.150 ns/op +0.45 ns/op / +4.2% (worse)
macOS BenchmarkDirectCall 0.864 ns/op -0.0792 ns/op / -8.4% (better)
macOS BenchmarkGlobalRead 0.861 ns/op -0.1566 ns/op / -15.4% (better)
macOS BenchmarkGlobalWrite 0.865 ns/op -0.0794 ns/op / -8.4% (better)
macOS BenchmarkGoroutine 38939 ns/op -7898 ns/op / -16.9% (better)
macOS BenchmarkInterfaceCall 3.147 ns/op -0.001 ns/op / -0.03177% (better)
macOS BenchmarkRuntimeGetG 2.025 ns/op -0.373 ns/op / -15.6% (better)
Windows MinGW BenchmarkLookupPCRandom 9.749 ns/op +0.11 ns/op / +1.1% (worse)
Windows MinGW BenchmarkMergeCompilerFlags 377.500 ns/op -36.5 ns/op / -8.8% (better)
Windows MinGW BenchmarkMergeLinkerFlags 333.100 ns/op -1.8 ns/op / -0.5% (better)
Windows MinGW BenchmarkChannelBuffered 28.350 ns/op +1.29 ns/op / +4.8% (worse)
Windows MinGW BenchmarkChannelHandoff 1040 ns/op +71 ns/op / +7.3% (worse)
Windows MinGW BenchmarkDefer 12.770 ns/op +0.45 ns/op / +3.7% (worse)
Windows MinGW BenchmarkDirectCall 1.357 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkGlobalRead 1.358 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW BenchmarkGlobalWrite 2.167 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW BenchmarkGoroutine 59443 ns/op +1451 ns/op / +2.5% (worse)
Windows MinGW BenchmarkInterfaceCall 5.889 ns/op -0.088 ns/op / -1.5% (better)
Windows MinGW BenchmarkRuntimeGetG 1.629 ns/op -0.003 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkLookupPCRandom 26.540 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkMergeCompilerFlags 703.400 ns/op -75.1 ns/op / -9.6% (better)
Windows MinGW 386 BenchmarkMergeLinkerFlags 652.200 ns/op -44.7 ns/op / -6.4% (better)
Windows MinGW 386 BenchmarkChannelBuffered 43.660 ns/op -0.14 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkChannelHandoff 906.800 ns/op -4.4 ns/op / -0.5% (better)
Windows MinGW 386 BenchmarkDefer 14.910 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkDirectCall 1.550 ns/op +0.002 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkGlobalRead 1.859 ns/op -0.005 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkGlobalWrite 7.786 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkGoroutine 104539 ns/op -74 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkInterfaceCall 7.439 ns/op -0.05 ns/op / -0.7% (better)
Windows MinGW 386 BenchmarkRuntimeGetG 2.167 ns/op -0.001 ns/op / -0.04613% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.040 ns/op -0.05 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 565.900 ns/op -47.1 ns/op / -7.7% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 532.300 ns/op -57.3 ns/op / -9.7% (better)
Windows MinGW ARM64 BenchmarkChannelBuffered 42.840 ns/op +0.91 ns/op / +2.2% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 3820 ns/op -318 ns/op / -7.7% (better)
Windows MinGW ARM64 BenchmarkDefer 11.800 ns/op -0.34 ns/op / -2.8% (better)
Windows MinGW ARM64 BenchmarkDirectCall 0.590 ns/op +0.0004 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkGlobalRead 0.665 ns/op -0.0014 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.663 ns/op -0.0001 ns/op / -0.01508% (better)
Windows MinGW ARM64 BenchmarkGoroutine 63378 ns/op +1276 ns/op / +2.1% (worse)
Windows MinGW ARM64 BenchmarkInterfaceCall 3.869 ns/op -0.087 ns/op / -2.2% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.770 ns/op -0.004 ns/op / -0.2% (better)
Windows MSVC BenchmarkLookupPCRandom 12.950 ns/op -0.21 ns/op / -1.6% (better)
Windows MSVC BenchmarkMergeCompilerFlags 670.600 ns/op +43.7 ns/op / +7.0% (worse)
Windows MSVC BenchmarkMergeLinkerFlags 588.600 ns/op +43.3 ns/op / +7.9% (worse)
Windows MSVC BenchmarkChannelBuffered 34.100 ns/op -0.25 ns/op / -0.7% (better)
Windows MSVC BenchmarkChannelHandoff 1258 ns/op -43 ns/op / -3.3% (better)
Windows MSVC BenchmarkDefer 14.660 ns/op +0.38 ns/op / +2.7% (worse)
Windows MSVC BenchmarkDirectCall 1.860 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC BenchmarkGlobalRead 1.550 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC BenchmarkGlobalWrite 2.459 ns/op +0.002 ns/op / +0.1% (worse)
Windows MSVC BenchmarkGoroutine 90637 ns/op +2607 ns/op / +3.0% (worse)
Windows MSVC BenchmarkInterfaceCall 7.459 ns/op -0.295 ns/op / -3.8% (better)
Windows MSVC BenchmarkRuntimeGetG 2.173 ns/op +0.004 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 68.960 ns/op -0.3 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 921.800 ns/op +21.5 ns/op / +2.4% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 836.100 ns/op -2.3 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkChannelBuffered 65.440 ns/op +0.61 ns/op / +0.9% (worse)
Windows MSVC 386 BenchmarkChannelHandoff 2546 ns/op +459 ns/op / +22.0% (worse)
Windows MSVC 386 BenchmarkDefer 16.440 ns/op +0.06 ns/op / +0.4% (worse)
Windows MSVC 386 BenchmarkDirectCall 0.948 ns/op +0.0141 ns/op / +1.5% (worse)
Windows MSVC 386 BenchmarkGlobalRead 1.162 ns/op -0.011 ns/op / -0.9% (better)
Windows MSVC 386 BenchmarkGlobalWrite 16.290 ns/op +0.12 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkGoroutine 97097 ns/op -1191 ns/op / -1.2% (better)
Windows MSVC 386 BenchmarkInterfaceCall 6.078 ns/op +0.021 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkRuntimeGetG 2.015 ns/op -0.009 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.160 ns/op +0.1 ns/op / +0.8% (worse)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 576.700 ns/op -1.4 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 534.900 ns/op -9 ns/op / -1.7% (better)
Windows MSVC ARM64 BenchmarkChannelBuffered 45.350 ns/op -0.19 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 5855 ns/op +1062 ns/op / +22.2% (worse)
Windows MSVC ARM64 BenchmarkDefer 11.810 ns/op -0.48 ns/op / -3.9% (better)
Windows MSVC ARM64 BenchmarkDirectCall 0.590 ns/op +0.0004 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGlobalRead 0.671 ns/op +0.0081 ns/op / +1.2% (worse)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.800 ns/op +0.006 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkGoroutine 57716 ns/op -962 ns/op / -1.6% (better)
Windows MSVC ARM64 BenchmarkInterfaceCall 3.912 ns/op +0.036 ns/op / +0.9% (worse)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.768 ns/op -0.033 ns/op / -1.8% (better)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 931.300 ns/op -5.4 ns/op / -0.6% (better)
Linux AfterFuncZeroDelivery/LLGo 45429 ns/op +25 ns/op / +0.1% (worse)
Linux CreateStop/Go 309.300 ns/op +10.1 ns/op / +3.4% (worse)
Linux CreateStop/LLGo 1302 ns/op -105 ns/op / -7.5% (better)
Linux RearmStopped/Go 115.900 ns/op +0.7 ns/op / +0.6% (worse)
Linux RearmStopped/LLGo 1101 ns/op +93 ns/op / +9.2% (worse)
Linux ResetActive/Go 67.680 ns/op 0 ns/op / +0.0%
Linux ResetActive/LLGo 684 ns/op +40.8 ns/op / +6.3% (worse)
Linux ResetHeap1024/Go 67.930 ns/op +0.42 ns/op / +0.6% (worse)
Linux ResetHeap1024/LLGo 132.300 ns/op -1 ns/op / -0.8% (better)
macOS AfterFuncZeroDelivery/Go 328 ns/op -43.4 ns/op / -11.7% (better)
macOS AfterFuncZeroDelivery/LLGo 46886 ns/op +45 ns/op / +0.1% (worse)
macOS CreateStop/Go 112.500 ns/op -5.7 ns/op / -4.8% (better)
macOS CreateStop/LLGo 326.200 ns/op +2 ns/op / +0.6% (worse)
macOS RearmStopped/Go 50.680 ns/op -7.16 ns/op / -12.4% (better)
macOS RearmStopped/LLGo 235.100 ns/op +7.8 ns/op / +3.4% (worse)
macOS ResetActive/Go 35.540 ns/op -5.65 ns/op / -13.7% (better)
macOS ResetActive/LLGo 132 ns/op -3.2 ns/op / -2.4% (better)
macOS ResetHeap1024/Go 35.570 ns/op -5.26 ns/op / -12.9% (better)
macOS ResetHeap1024/LLGo 59 ns/op +3.43 ns/op / +6.2% (worse)
Windows MinGW AfterFuncZeroDelivery/Go 372.600 ns/op -7.6 ns/op / -2.0% (better)
Windows MinGW AfterFuncZeroDelivery/LLGo 113972 ns/op -369 ns/op / -0.3% (better)
Windows MinGW CreateStop/Go 89.710 ns/op -1.88 ns/op / -2.1% (better)
Windows MinGW CreateStop/LLGo 369.800 ns/op -5.8 ns/op / -1.5% (better)
Windows MinGW RearmStopped/Go 24.440 ns/op -0.06 ns/op / -0.2% (better)
Windows MinGW RearmStopped/LLGo 195.300 ns/op -13 ns/op / -6.2% (better)
Windows MinGW ResetActive/Go 14.780 ns/op -0.04 ns/op / -0.3% (better)
Windows MinGW ResetActive/LLGo 124.400 ns/op -4.6 ns/op / -3.6% (better)
Windows MinGW ResetHeap1024/Go 14.880 ns/op -0.13 ns/op / -0.9% (better)
Windows MinGW ResetHeap1024/LLGo 85.580 ns/op +0.63 ns/op / +0.7% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 964.800 ns/op +1.6 ns/op / +0.2% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 202063 ns/op +3459 ns/op / +1.7% (worse)
Windows MinGW 386 CreateStop/Go 193 ns/op -1.9 ns/op / -1.0% (better)
Windows MinGW 386 CreateStop/LLGo 415.600 ns/op -32.1 ns/op / -7.2% (better)
Windows MinGW 386 RearmStopped/Go 63.530 ns/op -0.28 ns/op / -0.4% (better)
Windows MinGW 386 RearmStopped/LLGo 345.200 ns/op +16.2 ns/op / +4.9% (worse)
Windows MinGW 386 ResetActive/Go 39.020 ns/op +0.06 ns/op / +0.2% (worse)
Windows MinGW 386 ResetActive/LLGo 1004 ns/op +28.4 ns/op / +2.9% (worse)
Windows MinGW 386 ResetHeap1024/Go 39.450 ns/op +0.04 ns/op / +0.1% (worse)
Windows MinGW 386 ResetHeap1024/LLGo 149 ns/op +2.1 ns/op / +1.4% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 655.700 ns/op -25.1 ns/op / -3.7% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 147328 ns/op +1147 ns/op / +0.8% (worse)
Windows MinGW ARM64 CreateStop/Go 196 ns/op -1.7 ns/op / -0.9% (better)
Windows MinGW ARM64 CreateStop/LLGo 336.900 ns/op +17.3 ns/op / +5.4% (worse)
Windows MinGW ARM64 RearmStopped/Go 70.590 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 RearmStopped/LLGo 160.300 ns/op -1.5 ns/op / -0.9% (better)
Windows MinGW ARM64 ResetActive/Go 31.110 ns/op +0.16 ns/op / +0.5% (worse)
Windows MinGW ARM64 ResetActive/LLGo 114.200 ns/op +28.03 ns/op / +32.5% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.070 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 ResetHeap1024/LLGo 91.110 ns/op -0.56 ns/op / -0.6% (better)
Windows MSVC AfterFuncZeroDelivery/Go 549.700 ns/op -16.1 ns/op / -2.8% (better)
Windows MSVC AfterFuncZeroDelivery/LLGo 185061 ns/op -1620 ns/op / -0.9% (better)
Windows MSVC CreateStop/Go 119.900 ns/op +4 ns/op / +3.5% (worse)
Windows MSVC CreateStop/LLGo 432.500 ns/op -28.8 ns/op / -6.2% (better)
Windows MSVC RearmStopped/Go 31.720 ns/op +0.17 ns/op / +0.5% (worse)
Windows MSVC RearmStopped/LLGo 239.700 ns/op -44.6 ns/op / -15.7% (better)
Windows MSVC ResetActive/Go 20.030 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC ResetActive/LLGo 191.700 ns/op -46.2 ns/op / -19.4% (better)
Windows MSVC ResetHeap1024/Go 20.470 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC ResetHeap1024/LLGo 104 ns/op +2.3 ns/op / +2.3% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 1115 ns/op -19 ns/op / -1.7% (better)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 204821 ns/op +6118 ns/op / +3.1% (worse)
Windows MSVC 386 CreateStop/Go 267.800 ns/op -2.4 ns/op / -0.9% (better)
Windows MSVC 386 CreateStop/LLGo 1042 ns/op -77 ns/op / -6.9% (better)
Windows MSVC 386 RearmStopped/Go 91.980 ns/op -0.25 ns/op / -0.3% (better)
Windows MSVC 386 RearmStopped/LLGo 632 ns/op -34.9 ns/op / -5.2% (better)
Windows MSVC 386 ResetActive/Go 46.520 ns/op +0.41 ns/op / +0.9% (worse)
Windows MSVC 386 ResetActive/LLGo 302.500 ns/op -88.2 ns/op / -22.6% (better)
Windows MSVC 386 ResetHeap1024/Go 46.440 ns/op -0.05 ns/op / -0.1% (better)
Windows MSVC 386 ResetHeap1024/LLGo 137.500 ns/op +1.9 ns/op / +1.4% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 665.500 ns/op -0.8 ns/op / -0.1% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 141497 ns/op +1937 ns/op / +1.4% (worse)
Windows MSVC ARM64 CreateStop/Go 199.300 ns/op +0.7 ns/op / +0.4% (worse)
Windows MSVC ARM64 CreateStop/LLGo 274 ns/op -9.6 ns/op / -3.4% (better)
Windows MSVC ARM64 RearmStopped/Go 70.550 ns/op -0.05 ns/op / -0.1% (better)
Windows MSVC ARM64 RearmStopped/LLGo 164.100 ns/op +4.1 ns/op / +2.6% (worse)
Windows MSVC ARM64 ResetActive/Go 30.940 ns/op +0.09 ns/op / +0.3% (worse)
Windows MSVC ARM64 ResetActive/LLGo 92.610 ns/op +1.2 ns/op / +1.3% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 30.990 ns/op +0.03 ns/op / +0.1% (worse)
Windows MSVC ARM64 ResetHeap1024/LLGo 91.450 ns/op -0.57 ns/op / -0.6% (better)

Compared with a87e123ec339 measured in the same runner job.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

d9f14bea757d | workflow run | long-term charts

WebAssembly output sizes
Example, profile and compiler Wasm module vs base Generated JS glue vs base
cprintf/j32-emscripten/LLGo 152552 B +133 B / +0.1% (worse) 88932 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 151502 B +133 B / +0.1% (worse) 72985 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 140015 B +122 B / +0.1% (worse) 92103 B 0 B / +0.0%
cprintf/w32-goos-wasip1/LLGo 15937 B 0 B / +0.0% 0 B 0 B / 0.0%
cprintf/w32-wasi/LLGo 15937 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-emscripten/LLGo 1613564 B +83 B / +0.005144% (worse) 118989 B 0 B / +0.0%
fmtprintf/j32-goos-js/Go 2526852 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-goos-js/LLGo 1672064 B +125 B / +0.007476% (worse) 89403 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 1502845 B +120 B / +0.007985% (worse) 121804 B 0 B / +0.0%
fmtprintf/w32-goos-wasip1/Go 2500019 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-goos-wasip1/LLGo 1060139 B +318 B / +0.03001% (worse) 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 1060583 B +318 B / +0.02999% (worse) 0 B 0 B / 0.0%
j32-emscripten/LLGo 151764 B +133 B / +0.1% (worse) 88932 B 0 B / +0.0%
j32-goos-js/Go 1895533 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-goos-js/LLGo 150969 B +133 B / +0.1% (worse) 72985 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 139273 B +122 B / +0.1% (worse) 92103 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1346884 B +117 B / +0.008687% (worse) 95624 B 0 B / +0.0%
reflectcall/j32-goos-js/Go 2191221 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/j32-goos-js/LLGo 1361445 B +107 B / +0.00786% (worse) 79673 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1234685 B +120 B / +0.00972% (worse) 99045 B 0 B / +0.0%
reflectcall/w32-goos-wasip1/Go 2205707 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-goos-wasip1/LLGo 998310 B +318 B / +0.03186% (worse) 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 998900 B +318 B / +0.03185% (worse) 0 B 0 B / 0.0%
w32-goos-wasip1/Go 1909947 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-goos-wasip1/LLGo 18855 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-wasi/LLGo 18855 B 0 B / +0.0% 0 B 0 B / 0.0%
LLGo WebAssembly build measurements
Example and profile Build vs base
j32-emscripten 8.812 s -1.714 s / -16.3% (better)
j32-goos-js 8.627 s -1.313 s / -13.2% (better)
j64-emscripten-memory64 8.004 s -432.7 ms / -5.1% (better)
reflectcall/w32-wasi 27.257 s -3.708 s / -12.0% (better)
w32-goos-wasip1 4.725 s -127.5 ms / -2.6% (better)
w32-wasi 4.310 s -21.39 ms / -0.5% (better)

Compared with a87e123ec339 measured in the same runner job.

@xushiwei xushiwei added llgo-only Features that llgo supports but Go does not proposal Proposal Proposal-Denied labels Nov 11, 2026
@xushiwei

Copy link
Copy Markdown
Contributor

For llgo-specific extensions, the use of struct.AlignXX is discouraged; instead, //llgo:align XX should be used to clearly indicate that this is a feature exclusive to llgo.

@xushiwei xushiwei closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llgo-only Features that llgo supports but Go does not proposal Proposal Proposal-Denied

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants