Urgent.News

What's breaking now, across thousands of outlets.

Tech

Replacing a Rust Enum with a 64-bit Word Made My Interpreter 17% Faster

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.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at pointersgonewild.com →

More in Tech

The M5 Ultra Mac Studio: I Did the Math So You Don't Have To

Apple announced the new Mac Studio this morning — M5 Max and the first-ever M5 Ultra. Pre-orders are open, units ship September 22, and the headline for our corner of the world is this: up to 512GB of…

  • Apple introduces M5 Ultra Mac Studio with two new models
  • Pre-orders start immediately, shipping on September 22
  • Base model at $5,499, high-end at $6,799 with 512GB upgrade

★ Memory and Storage Configurations and Pricing for the New Mac Minis (M6/M5 Pro) and Mac Studios (M5 Max/M5 Ultra)

Here’s my attempt to put all of the RAM/SSD configurations into condensed tables, so you can see which storage and memory options are available for each chip, and how much they cost.

  • Mac Mini M6 starts at $900, with RAM upgrades costing $0 to $400
  • Mac Studio M5 Max priced at $2,500, RAM options from $0 to $2000
  • Mac Studio M5 Ultra begins at $5,500, with RAM upgrades from $0 to $4000

“Europe is aging rapidly”: Solace Care raises €2.1 million in largest pre-Seed round to date for a European end-of-life platform

Solace Care, a Stockholm-based end-of-life platform, has raised a pre-Seed round of €2.1 million to expand its insurer and broker partnerships, enter the Netherlands and the UK, and grow its product…

  • Solace Care raises €2.1 million in largest pre-Seed round
  • Led by Spintop Ventures, with participation from Plug and Play and other investors
  • Funds to expand partnerships, enter new markets, and grow teams

More from Tuesday 25 August →