Repository navigation
Post #1 — Why I'm Building a Database Engine in C# #242
nockawa
announced in
Announcements
Replies: 1 comment
|
That's nice ! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
When I tell people I'm building an ACID database engine in C#, the first reaction is always the same: "But what about GC pauses?" This post is the steel-man — every reasonable argument against the choice, plus the reasons it works anyway.
The insight that holds the whole project together: memory layout matters more than the language. A cache miss on Zen 4 costs 61-73 ns. A CAS hitting L1 costs 1.4 ns. That's a 50:1 ratio. No amount of "zero-cost abstraction" beats a cache-friendly layout, and modern C# —
unsafe,ref struct, pinned memory, hardware intrinsics,[StructLayout(Explicit)]— gives you everything you need to build one.Read it: https://nockawa.github.io/blog/why-building-database-engine-in-csharp/
All reactions