4 ms·
I don't think you understand the point of bun. It's not to make npm/webpack/typescript faster at running JS code, it's to replace those tools entirely. So in es
by jdxcode 4y ago
I don't think you understand the point of bun. It's not to make npm/webpack/typescript faster at running JS code, it's to replace those tools entirely. So in essence, it's doing the same thing that esbuild is doing, just across all of the major tasks people currently do with node. What's different about bun vs esbuild is that it's one tool you can use for everything you do in JS projects.
I've swapped much of my usage of npm over to bun. I still work on projects where nobody else is using bun, but I can run `bun install` instead of `npm install` and `bun run` instead of `npm run` and these run probably 100x faster.
- pier25 4y ago> So in essence, it's doing the same thing that esbuild is doing, just across all of the major tasks people currently do with node. Except that Bun is not going to be able to do what esbuild is doing because Go and other languages are in another league regarding perf.
- pfg_ 4y agobun is already faster than esbuild? i don't understand this comment. the bun transpiler is basically a direct port of esbuild to zig. esbuild is a javascript transpiler. it transpiles typescript into javascript that v8 or another js engine can run. it's written in go which is the main reason it's faster than pure js transpilers like babel. were you thinking that esbuild is for go code? i'm confused bun is a combined javascript transpiler & runtime & test runner & package manager. it improves performance of many things: - startup time including transpiling code and resolving modules and initializing the javascript vm - installing packages - running tests it can also improve runtime performance (it is faster at basically every bit of the node api it covers & it has its own versions of some things like http servers that can have better performance than the node APIs) switching your project to rust would improve runtime performance, but would make it slower to run tests & compile the project & use an ide language server & … i haven't used go but i've heard it's fast to compile & has better runtime performance than js
- jdxcode 4y agoHow on earth have you come to that conclusion? Bun is written in Zig—which is a low-level C replacement.
- pier25 4y agoSo? V8 is written in C++ and yet the JS performance is nowhere near as close to that.