# rat kompiliert C99 mit einem 584-Zeilen-Register-Allocator effizienter als mit 1392 Zeilen

Original title: Rat's Register Allocator

> Hacker News story 50030470 · language: de · submitted 2026-10-10
> Web version: https://zeli.app/de/story/50030470
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 68 · by [mpweiher](<https://news.ycombinator.com/user?id=mpweiher>) · 💬 4
[original](<https://hexrat.cc/pages/blog/2026_10_07>) · [HN discussion](<https://news.ycombinator.com/item?id=50030470>)

## Summary

rat, ein kleiner Compiler-Backend mit halb funktionierendem C99-Frontend, hat seinen linear-scan-Register-Allocator durch einen Priority-Bin-Packing-Allocator ersetzt. Der neue Allocator ist mit 584 Zeilen deutlich kürzer als der alte mit 1392 Zeilen und erzeugt besseren Code. Er teilt Live-Ranges in Segmente auf, führt Coalescing durch und weist Register nach Priorität zu – ohne Eviction, Splitting oder wiederholte Durchläufe.

## Key quote

> Kein Code im Allocator sagt: »Lege Werte, die einen Call überleben, in callee-saved Register.« Das ergibt sich aus dem Design, und das ist mein Lieblingsteil.

---

## Cite

- Page: https://zeli.app/de/story/50030470
- Date: 2026-10-10
- Source: hexrat.cc (https://hexrat.cc/pages/blog/2026_10_07)
- Hacker News: https://news.ycombinator.com/item?id=50030470

## Other languages

- en: https://zeli.app/story/50030470 · markdown: https://zeli.app/story/50030470.md
- zh: https://zeli.app/zh/story/50030470 · markdown: https://zeli.app/zh/story/50030470.md
- ja: https://zeli.app/ja/story/50030470 · markdown: https://zeli.app/ja/story/50030470.md
- ko: https://zeli.app/ko/story/50030470 · markdown: https://zeli.app/ko/story/50030470.md
- es: https://zeli.app/es/story/50030470 · markdown: https://zeli.app/es/story/50030470.md
- ru: https://zeli.app/ru/story/50030470 · markdown: https://zeli.app/ru/story/50030470.md
