{
  "id": 3319883,
  "title": "Replacing a Rust Enum with a 64-bit Word Made My Interpreter 17% Faster",
  "url": "https://urgent.news/2026/08/25/replacing-a-rust-enum-with-a-64-bit-word-made-my-interpreter-17-faster",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-25T14:40:28.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://pointersgonewild.com/2026-08-25-replacing-a-rust-enum-with-a-64-bit-word/"
  },
  "original_language": "en",
  "account": "In a recent blog post, the author discusses how replacing a Rust enum with a 64-bit word in the Plush language interpreter led to a 17% speed increase. Plush is a dynamically-typed language, similar to Python, JavaScript, Ruby, Lua, and Lox, and uses a Value type to represent any value in the language. The original version of Plush used a plain Rust tagged enum, which caused memory waste due to each enum variant requiring 128 bits. The author decided to design a more efficient low-bit tagging scheme, encoding 5 different kinds of values: fixnums, flonums, immediates, and two kinds of pointers. This new representation fits within a Rust newtype wrapping a u64, and includes convenience methods to make it easy to work with. The author claims that this change not only increased memory efficiency but also resulted in a performance boost, contrary to their initial fears.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}