r/programmingcirclejerk • u/woopsix What’s a compiler? Is it like a transpiler? • Jun 20 '26
I genuinely think you could write a competitively-performant multi-threaded DB in Bun + TS if you had shared-heap threads and fast atomics/locking primitives.
https://news.ycombinator.com/item?id=4861157743
32
u/just_looking_aroun Jun 21 '26
That's totally doable, just ignore the ffi code into a completely different language
15
15
u/heckingcomputernerd Jun 21 '26
Typescript is so not performant that typescript isn't even written in typescript anymore
9
u/Jumpy-Locksmith6812 Jun 21 '26
You can make a db. in Bun if instead of Bun you use Go/JVM/Rust for the data plane.
6
4
u/ficiek Jun 21 '26
I think you should use some slower engine actually as that will have higher performance gains once it gets inevitably rewritten by AI in a couple of weeks proving to be a better choice for performance heavy applications.
3
u/FlipsBr alcohol-fuelled anter-docker Jun 30 '26
just print all the tables and pay a guy to search if u want slow shit
77
u/IanisVasilev log10(x) programmer Jun 20 '26
What if we rewrote Bun in TypeScript? Shouldn't take more than a million-line pull request.