Repository navigation
'whitespace' become possibly overflow on 32bit architecture. - #1
Merged
Merged
Conversation
yuin
added a commit
that referenced
this pull request
Feb 16, 2015
'whitespace' become possibly overflow on 32bit architecture.
yuin
pushed a commit
that referenced
this pull request
Apr 1, 2026
pschlump
added a commit
to pschlump/gopher-lua
that referenced
this pull request
Nov 1, 2026
cmd/luabench ported from glasm (11 scripts, 4 postures: interp / cold / warm / vmcache, output-checked). Baseline + pprof recorded in docs/Perf-P0-Baseline.md with the ×C calibration against glasm's same-machine C 5.5.1 numbers. Headline finding, revising the 2026-09 ranking by measurement: the per-instruction context check (old yuin#9 "misc") is the yuin#1 cost in the production posture — the warm leg runs 1.3-1.7x the ctx-free interp leg on every compute lane; isolated A/B on h_numloop: no-ctx 114.5ms, Background 148.7ms (+30%, nil-channel short-circuit), real cancelable context 186.8ms (+63%). numloop warm is 22.2x C; ctx-free interp 13.8x. P1a (amortized deadline check: back-edges + calls) promoted above P1 in the plan — days of work reclaiming more than P1's whole estimated 10-25% on loop lanes. fib/callret profiles confirm register bookkeeping and call overhead as the next costs. Co-Authored-By: Claude Code <noreply@anthropic.com>
pschlump
added a commit
to pschlump/gopher-lua
that referenced
this pull request
Nov 1, 2026
The per-instruction ctx/budget select in mainLoopWithContext measured +63% on h_numloop and 1.3-1.7x the ctx-free loop on every compute lane (Perf-P0-Baseline.md Finding 1) — the yuin#1 production-posture cost. Now probed every 64 instructions (deadlineCheckEvery countdown), plus one probe at every G-call RETURN: a blocked G function (channellib's reflect.Select races ctx) observes cancellation and returns NORMALLY, and the old next-instruction probe was what converted that into the raise — a bare stride let a <64-instruction tail exit successfully (TestCancelChannelReceive/2). Suspended calls (yield) skip the probe; their resume bookkeeping must complete. Contract unchanged: bare raise text, daemon normalization to ScriptError{ctx, Line 0}; latency now bounded by 64 instruction boundaries instead of 1. Gates: go test . (goldens byte-exact, zero diffs), go test ./..., -race ./host/ -count=2, race on channel/context tests, ultima lib/scripting + lib/commands green, CGO_ENABLED=0 build. benchstat A/B (3 reps/tree vs bc31b4f): warm numloop -35.6%, tco -39.8%, fib -29.7%, nsieve -33.8%, callret -30.9%, hostfn -13.5%; geomean over all 44 cells -18.49%. Interp legs flat (untouched). Warm/interp gap closed to ~2%; numloop 22.2xC -> 14.6xC. Record: docs/Perf-P1a-Deadline-Check.md; plan sequencing updated (P1 register windows is now the top measured cost center). Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.