← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

Optimizing the Plush Language's Garbage Collector for Performance

🔄 Updated 2h ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Plush is a toy Lox-like language with actor-based parallelism.
  • Each actor in Plush has its own independent garbage collector.
  • The current GC collects one million objects in 117ms, exceeding the 20ms goal.
  • The performance issue stems from a shortcut in the copying GC implementation.

Background on Plush Language

Plush is a toy Lox-like language created to explore interpreter and virtual machine design concepts. It features actor-based parallelism, designed to avoid global VM locks and full VM pauses. The language includes basic interpreter optimizations and a copying Garbage Collector (GC).

Independent Garbage Collection in Plush

A notable feature of Plush is that each actor possesses its own fully independent GC. This design allows each actor to execute a collection cycle without requiring any synchronization. However, the performance of this GC has been disappointing, falling short of the developer's targets.

Performance Goals and Current Limitations

The developer set a personal goal for the Plush GC to collect one million live objects in under 20 milliseconds, aiming for performance suitable for 3D game engine development without noticeable pauses. A microbenchmark showed the current implementation collects one million objects in approximately 117ms on a MacBook Air M5, significantly slower than the target. This performance deficit is attributed to a shortcut taken during the initial implementation of the copying GC.

Copying GC Mechanism

A traditional Cheney copying collector moves objects from a 'from-space' to a 'to-space', utilizing a forwarding pointer in each object's header and using the 'to-space' as a work list to traverse live objects. In Plush, each actor uses a private allocator for objects and a message allocator for inter-actor communication, where objects are copied into the receiver's message allocator when sent.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~15 min · 13 stories · Aug 17

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Primary sources

GitHub maximecb/plush

Reporting from

The developer of Plush, a toy Lox-like language with actor-based parallelism, is working to improve the performance of its independent garbage collector (GC). The current GC implementation is too slow for the developer's goal of enabling 3D game engine development without noticeable GC pauses, prompting a re-evaluation of its copying mechanism.