Status: done (2026-11-19)
Priority: 3
Size: S
Arch: yardstick
Phase: implement
Design ref: none (test infrastructure). Kim, 10 Nov 2026 (code review).
Goal: Three places in src/ are written as they are because of the JavaScript engine, not the problem: decode gives an object all its keys before its values (saves.js:155-167) and fadeRelations copies a record’s memories instead of deleting keys (sift, relations.js:162), both to keep objects out of dictionary mode (VB-205); and driftPerson is a function of its own to avoid repeated deoptimisation (culture.js:190, VB-195). Nothing notices if an engine update makes one useless or harmful.
Acceptance criteria:
tests/perf.js --engine (in verify, reporting, and failing only as below) times each of the three as it is against its plain form, on small-y40 if the fixture is there and on a populous small run of 5 years if not: (1) a year of simulation after Sim.load with decode as it is, against a decode that sets each key in turn; (2) a year with fadeRelations as it is, against one that deletes the faded keys; (3) Culture.dailyStep over 48 days with driftPerson apart, against the loop written in place. The plain forms live in the test, not in src/.src/ name the test in place of the old measurement. Nothing in src/ changes otherwise: node tools/same.js --base REF prints same.sift, which fadeRelations calls); VB-240 is done, so case (2) may show nothing either way, and the task says so if it does.fadeRelations few memories to walk (about 400 against 67,000 at medium-ref): if it has landed, case (2) may show nothing either way, and the copy can then go for plainness, in that task or this.Map for a record’s memories would need no workaround; that is a change to saved state, for VB-240 or after it.Done (19 Nov 2026):
tests/perf.js --engine (tests/lib/engine-bench.js); the plain forms are text edits of the module source in a child process each. The comments in src/ name it.