←back to thread

151 points lilprince1218 | 1 comments | | HN request time: 0.195s | source

Hey HN,

I'm 13, from Nigeria, and I just released PrinceJS — the fastest web framework for Bun right now.

• 19,200 req/s (beats Hono/Elysia/Express) • 2.8 kB gzipped • Tree-shakable (cache, AI, email, cron, SSE, queue, test, static...) • Zero deps. Zero config.

Built in < 1 week. No team. Just me and Bun.

Try it: `bun add princejs` GitHub: https://github.com/MatthewTheCoder1218/princejs Docs: https://princejs.vercel.app

Brutal feedback welcome. What's missing?

– @Lil_Prince_1218

1. lxe ◴[] No.45958030[source]
Object.defineProperty on every request to set params / query / body is probably slower than regular property assignment.

Also parsing the body on every request without the ability to change it could hurt performance (if you're going for performance that is as a primary factor).

I wonder if the trie-based routing is actually faster than Elysia in precompile mode set to enabled?

Overall, this is a nice wrapper on top of bun.serve, structured really well. Code is easy to read and understand. All the necessary little things taken care of.

The dev experience of maintaining this is probably a better selling point than performance.