Skip to content

chore: upgrade Go toolchain 1.25.4 → 1.27.0 - #165

Open
kolkov wants to merge 2 commits into
mainfrom
feature/go1.27-upgrade
Open

chore: upgrade Go toolchain 1.25.4 → 1.27.0#165
kolkov wants to merge 2 commits into
mainfrom
feature/go1.27-upgrade

Conversation

@kolkov

@kolkov kolkov commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrade Go toolchain from 1.25.4 to 1.27.0 to benefit from three compiler optimizations:

  • Known-bits dataflow pass — tracks provable 0/1 bits, folds redundant ops. May eliminate DFA bounds checks on ft[offset]
  • Loop-invariant code motion (LICM) — hoists invariants out of loops. 10.17% improvement on regexp/syntax benchmarks (same loop type as our DFA/NFA)
  • Switch-to-lookup table — dense switch→table compilation. Benefits our 13-way strategy dispatch

Also: size-specialized malloc for <80 byte objects, Green Tea GC (old GC removed).

Zero breaking changes. All tests pass. Assembly files fully compatible.

Test plan

  • go build ./... — clean
  • go test ./... — all 11 packages pass
  • go vet ./... — clean
  • CI: tests on 3 OS (ubuntu, macos, windows)
  • CI: benchmark comparison vs main (Go 1.25.4)
  • regex-bench: full comparison on AMD EPYC (Go+Rust)

Go 1.27 compiler improvements: known-bits dataflow, LICM (10% on
regexp/syntax loops), switch-to-lookup-table. All tests pass,
assembly fully compatible, zero breaking changes.
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Benchmark Comparison

Comparing main → PR #165

Summary: geomean 76.34n 76.73n +0.50%

⚠️ Potential regressions detected:

geomean                    76.34n         76.73n        +0.50%
geomean                               ³                +0.00%               ³
geomean                               ³                +0.00%               ³
geomean              32.32n         32.34n        +0.05%
geomean                         ³                +0.00%               ³
geomean                         ³                +0.00%               ³
AnchoredLiteralVsStdlib/stdlib_long-4                   510.0n ± ∞ ¹    554.9n ± ∞ ¹    +8.80% (p=0.008 n=5)
LangArenaLogParserStdlib/errors-4                       9.847m ± ∞ ¹    9.973m ± ∞ ¹    +1.28% (p=0.032 n=5)
IPRegex_Find/stdlib_1KB_sparse-4                        19.38µ ± ∞ ¹    55.01µ ± ∞ ¹  +183.85% (p=0.008 n=5)
IPRegex_Find/stdlib_64KB_sparse-4                       404.7µ ± ∞ ¹   1126.2µ ± ∞ ¹  +178.28% (p=0.008 n=5)

Full results available in workflow artifacts. CI runners have ~10-20% variance.
For accurate benchmarks, run locally: ./scripts/bench.sh --compare

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