Live data from Hacker News

The JavaScript Oxidation Compiler

oxc.rs

21–30 of 147 posts

Re: The JavaScript Oxidation Compiler

#21

I'm surprised to see it's that much faster than SWC. Does anyone have any general details on how that performance is achieved?

They wrote a post ( https://oxc.rs/docs/learn/performance ) but it doesn't include direct comparisons to SWC.

Their main page says 3x fast than SWC

Re: The JavaScript Oxidation Compiler

#23

I wonder why did it take so long for someone to make something(s) this fast when this much performance was always available on the table. Crazy accomplishment!

I believe it goes back a few years to originally being just oxlint, and then recently Void Zero was created to fund the project. One of the big obstacles I can imagine is that it needs extensive plugin support to support all the modern flavours of TypeScript like React, Vue, Svelte, and backwards compatibility with old linting rules (in the case of oxlint, as opposed to oxc which I imagine was a by-product).

Re: The JavaScript Oxidation Compiler

#24

I wonder why did it take so long for someone to make something(s) this fast when this much performance was always available on the table. Crazy accomplishment!

It takes a good programmer to write it, and most good programmers avoid JavaScript, unless forced to use it for their day job. in that case, there is no incentive to speed up the part of the job that isn't writing JavaScript.

Re: The JavaScript Oxidation Compiler

#25
I expected a coparison to `bun build` in the transformer TS -> JS part.

But I guess it wouldn't be an apples to apples com parison because Bun can also run typescript directly.

Re: The JavaScript Oxidation Compiler

#28

[dead]

Oxc is not the first Rust-based product on the market that handles JS, there is also SWC which is now reasonably mature. I maintain a reasonably large frontend project (in the 10s of thousands of components) and SWC has been our default for years. SWC has made sure that there is actually a very decent support for JS in the Rust ecosystem.

I'd say my biggest concern is that the same engineers who use JS as their main language are usually not as adept with Rust and may experience difficulties maintaining and extending their toolchain, e.g. writing custom linting rules. But most engineers seem to be interested in learning so I haven't seen my concern materialize.

Re: The JavaScript Oxidation Compiler

#29
post #21

Earlier quoted context omitted.

They wrote a post ( https://oxc.rs/docs/learn/performance ) but it doesn't include direct comparisons to SWC.

Their main page says 3x fast than SWC

Yeah, but not how their implementation techniques differ from SWC's to produce those results.

Re: The JavaScript Oxidation Compiler

#30
Does oxc-parser make it easy to remove comments from JavaScript?

In other words does it treat comments as syntactic units, or as something that can be ignored wince they are not needed by the "next stage"?

The reason to find out what the comments are is of course to make it easy to remove them.

Post reply on HN