4 ms·
I can confirm a naive rewrite won't make things faster. I've been working on rewriting Postgres in Rust. I rewrote things function by function similar to how Ja
by malisper 3mo ago
I can confirm a naive rewrite won't make things faster. I've been working on rewriting Postgres in Rust. I rewrote things function by function similar to how Jarred did. Even though the new Rust code mapped closely with the previous C code, it was 8x slower. This was due to myriad of reasons. For example naively converting a C union into a Rust enum can be slower because Rust stores a tag with the enum, while C unions do not.
I've been working on a new rewrite that's focused on beating Postgres on performance. As of this morning I got to 100% of the tests passing and have meaningful performance gains over Postgres.
- nvader 3mo agoI hope that you're going to call it PostGrust.
- xeromal 3mo agoWould love to follow your journey!
- malisper 3mo agoIf you want to follow along, I've been writing about it on my blog (https://malisper.me/ https://malisper.me/) an you can follow the github repo here: https://github.com/malisper/pgrust https://github.com/malisper/pgrust
- xeromal 3mo agoBookmarked. I love ambitious projects like this. I'll check in!
- egorfine 3mo agoI find it curious that people who take other's people product and rewrite in their favorite programming language still name their own creation the name of the original one. Like, you have now created your own new database engine that happens to be compatible with Postgres. Wouldn't you take an absolute pride in giving it your own name? Why call it "Postgres rewrite in <programming language>"?
- psychoslave 3mo agoMaybe not everyone is utterly obsessed with vanity and its delusion?
- egorfine 3mo agoThen why use someone else's established brand for your toy project?
- psychoslave 3mo agoIf this is still speaking about the Postgres rewrite in Rust, then naming it something like pgrust[1] makes sense for ease of discovery for anyone aware of these technologies. [1] https://github.com/malisper/pgrust https://github.com/malisper/pgrust I guess
- khuey 3mo agoIf they did the opposite and called it Mygres or whatever people would give them shit for that too.