#zig
1 post · 1 note · filter on the home page
- Egres: A Postgres-compatible database for heavy, multi-tenant workloadsI love Postgres. It is an incredible database. But, its design is also 30 years old and most of what people fight in production comes from decisions made long time ago: VACUUM, transaction id wraparound, bloat, a process per connection…
Learnt an interesting thing about Zig’s SMP allocator. The whole code is very simple, some 200 lines, only deals with smaller objects, reuses but never releases memory it allocates, and defers to slow mmap for bigger objects, anything over 32KiB. Good, but not ideal.
Now, this is Zig. You can easily integrate any C based allocator, and there’s indeed a better one. Did pretty thorough benchmarking. Plan to release a blog post about that soon.