Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Object model step 4: performance and memory regressions to win back in step 5

Open
#12,618 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
8/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust, typescript

Research direction

Start with the step 4 merge (#12617) and reproduce the JSON parse + field sum ×20 benchmark, comparing instruction counts and max RSS against main. The payload names the JSON.parse record overflow table and the site caches as the causes, but no source files, so locate them from #12617. Done means the regressed benchmarks return to at or below the step 4 numbers with identical outputs; the layout-based record birth and the step 5 probe are design work for maintainers.

Written by the indexing model from the issue text.

Description

Object model step 4 (#12617) landed with accepted performance and memory regressions; step 5 (unknown-receiver probe) wins them back. Measured on main 20a676979 vs the step 4 merge (instructions:u n=3, max RSS n=3, outputs identical):

program Δinstr ΔRSS
JSON parse + field sum ×20 (20k records, 5 fields) +234.6% +93.8% (74 → 143 MB)
fastify inject +7.96% −1.5%
effect/main +6.41% +0.1%
tscwork +3.75% −1.0%
commander construct +3.28% +0.6%
zodwork +3.10% −0.3%
qs parse_nested +2.76% +1.3%
commander parse_argv +1.24% +0.2%
qs stringify_nested +0.55% +0.3%
JSON round-trip ×20 +0.01% +0.1%
binarytrees, buffer_heavy, root-survival, worker, hello ≤ +0.74% ≤ +1.1%

Causes known so far:

  • JSON.parse records carry an overflow table from birth (about 496 B for a 3-field record); every field read on them leaves the site caches.
  • fastify: 3 long-lived objects (instance/route context) get an overflow from decorate(name, v); about 318k slow reads per run. 21k EventEmitter _events maps and 16k JSON.parse objects get overflows.
  • Sites and memos don't serve receivers with an overflow until step 5.

Fix: JSON.parse records born with the layout of their key list (no overflow); step 5's probe of the layout key index / overflow index in compiled code.

Dominant language
Rust
Stars
4.9k
Forks
166
Avg merge
2h 20m
Merged PRs (30d)
916

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerryTS/perry

All issues in PerryTS/perry

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.