New Programming Languages versus Rust / C++
When a new block arrives on Ethereum, a computer at home can check for itself whether the network’s rules have been followed. The harder question is whether that computer can keep up while somebody else is using it. Nimbus set out to make verification practical on modest hardware. Its team chose Nim, a language that reads much like Python and can turn a program into C on its way to a native executable. The choice tells us something about how a team builds a small, efficient client. Measuring what the finished client needs tells us something else.
The creator
Araq and the design of Nim
- One language, two audiences
- A human reader sees indentation and compact procedures. For a native build, the platform compiler sees generated source that it can optimise for the target machine.
- The designer’s perspective
- The conference talk looks ahead to NIF and Nimony. The version used by Nimbus in the historical study and the version used in the CPU tests belong to earlier stages of the language.
Why Nimbus chose Nim
Ethereum’s consensus software checks the chain that validators agree on. A client has to translate a detailed specification into working rules and keep those rules up to date. In its account of the decision, the Nimbus team gives two reasons for choosing Nim. Its concise syntax helped the team implement Ethereum quickly. Its route through C gave the team access to mature compilers and static analysis tools. Being able to deploy the result on a small computer, including a Raspberry Pi, was a goal of the client. The Nimbus team’s explanation · The consensus client.
How close did Nimbus get? A research team monitored six consensus clients. In one phase it followed each client as it downloaded and checked the chain from its beginning, with the default configuration. Nimbus kept its memory allocation below 2 GB during this phase. The measurements ended on 18 March 2022, when the researchers could run the consensus client on its own. A present-day Ethereum node also needs an execution client. The old result describes an identifiable piece of the system at a particular moment, which is why it is still informative. Independent study, section IV-A and Figure 5 · Current Nimbus guide.
What happens to a block after the program has finished with it?
Consider a buffer holding a block while several parts of a program examine it. If they share a managed reference to that buffer, removing one reference still leaves the others able to read it. Nim’s default memory manager, ORC, tracks references and can reclaim a cycle of objects that only refer to one another. The compiler can replace some copying with a move or omit unnecessary reference-count operations. The programmer’s choice of data structure still determines how much has to be kept alive at once. Nim’s memory management guide.
Rust can express borrowing in types and check the lifetime of a borrow at compile time. C++ can bind a resource to the lifetime of an object and use shared ownership where necessary. With Nim a team can inspect its generated C and use the platform’s established build tools. These routes all end in native instructions. Their practical differences appear in the work left for the processor and in the rules a programmer has to follow. Borrowing in Rust · Resource ownership in C++ · Nim’s compilation targets.
Nim, Rust and C++ on the same processor
In the 15 November 2026 edition of benchLANG, the experimenter ran the programs on a Ryzen 9 5900X fixed at 3.5 GHz, with 48 GB of RAM and Arch Linux. The table gives three of the seven tasks. The author reports means from two runs, checks that the programs produce matching results and publishes the build commands. The compiler versions were Nim 2.2.12, Rust 1.99.1 and GCC 16.2.0 for C++. Results, method and compiler versions.

| CPU task | Nim | Rust | C++ |
|---|---|---|---|
| Mandelbrot | 0.55 | 0.55 | 0.55 |
| Binary trees | 0.25 | 0.55 | 0.56 |
| Text conversion | 0.44 | 0.39 | 0.33 |
On the 2,048 × 2,048 Mandelbrot image, the three reported times agree to the nearest hundredth of a second. Nim took the least time when building and discarding binary trees. For converting 8.2 million integers to text and reading them back, C++ took the least time. Over the entire seven-task process, peak memory use was 762 MiB for Nim, 216 MiB for Rust and 209 MiB for C++. That peak cannot be assigned to any one row. With two runs and one machine, small differences have uncertain significance. A home node also has to read its database and wait for other computers, both outside these CPU tests.
Beyond the Ethereum client
There is a separate account of Nim in professional use. In 2022, a member of Reddit’s analytics team described an internal tool, written primarily in Nim, that let colleagues query data without learning SQL. That use of the language concerned people asking questions about records. A chess engine provides a different example in which a trained model actually participates in a decision. First-hand account from Reddit engineering.
What this language can contribute to artificial intelligence
Heimdall evaluates chess positions with an efficiently updatable neural network. During a search, many candidate positions differ by a single move. Keeping intermediate values lets the engine update parts of the calculation as pieces move. Its Nim implementation can use a scalar calculation or execute the same arithmetic on several values at once, with vector instructions for x86 and ARM processors. This is inference on a CPU. The project identifies a separate tool, bullet, for training its networks on positions obtained from games between earlier versions of the engine. Heimdall’s network and training account · How its inference uses the processor.
Nim also has Arraymancer, a tensor library with automatic differentiation. Its handwritten-digit example calculates a training loss and uses its gradients to adjust the network’s parameters. Evidence for large model providers is more limited. We found no primary account of a major model provider using the Nim language internally to train or serve its models. NVIDIA’s similarly named NIM is a family of inference microservices. Arraymancer’s training example · NVIDIA NIM documentation.
For Heimdall, the measurable question is how many correctly evaluated positions the same processor can produce in a second. A comparison with Rust or C++ would need the same network weights, board positions, numerical precision and instruction set. The project’s documentation establishes how inference works and leaves that comparison open. The sources also leave open model security questions, including how a model behaves on deliberately misleading inputs.
What would settle the choice for a home node?
Put the intended computer on the network and measure two things separately. How long does it take to catch up after a week offline? Once caught up, how much memory and processor time does it need while the household uses the machine for other work? Specify the execution client, database, software versions and network conditions. Nimbus’s decision gives a team a reason to try Nim. Those two measurements would tell a node operator whether the resulting software fits the computer on the desk.
Liked this post? Follow this blog to get more.