Get the latest tech news

Roc rewrites the compiler in Zig


GitHub Gist: instantly share code, notes, and snippets.

Specifically, it needs to be split into multiple different steps, on top of which the current implementation has accumulated so much cruft that we'd discussed a rewrite of that section just to make it easier to work on. Apparently this has added about 5% to Zig's LLVM code gen times, but in the long run they (and we) can cache portions of bitcode, which can shift it to a net performance improvement compared to the status quo. Development backend: We currently do direct machine code generation (bypassing LLVM for a faster feedback loop), but now that we've seen what kind of performance that approach gets in practice, we want to try doing an interpreter instead.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of compiler

compiler

Photo of zig

zig

Photo of Roc

Roc

Related news:

News photo

In Zig, what's a writer?

News photo

Zig: What to Expect from Release Month

News photo

GCC 15 Compiler Enters Its Final Stage Of Development