alangpierce/sucrase
View on GitHub ↗ ★ 5,875 TypeScript
Super-fast alternative to Babel for when you can target modern JS runtimes
34 mentions on Hacker News by 20 people: 3 stories, 31 comments · first 2017-12-29 · latest 2025-07-25
20082026
-
…sucrase seems to be no longer maintained. [1]: https://github.com/altbdoor/sucrase-build-iife [2]: https://github.com/alangpierce/sucrase
comment by altbdoor · 2025-07-25 · in Show HN: Tsbro – TypeScript for the browser, no build step -
…JS runtime boundary. SWC abandoned plugins in JS for this reason. The dirty secret is, as Sucrase ( https://github.com/alangpierce/sucrase ) reveals, just that Babel is slow and the codebase really pays homage to the project name. Simply…
comment by wonnage · 2022-11-30 · in Speeding up the JavaScript ecosystem, one library at a time -
…an easier way for users to do this (though I don't know if they want that as core functionality). https://github.com/alangpierce/sucrase/issues/730 JS JIT creators don't get enough credit for their string implementations. Not much comes…
comment by hajile · 2022-11-30 · in Speeding up the JavaScript ecosystem, one library at a time -
…than SWC and esbuild in single-threaded performance and something like 20x faster than babel. https://github.com/alangpierce/sucrase The real issue isn't JS, but is the lack of profiling (as shown here) combined with wanting to be…
comment by hajile · 2022-11-30 · in Speeding up the JavaScript ecosystem, one library at a time -
…to run all tools in parallel, which should be more convincing despite the added variability: https://github.com/alangpierce/sucrase/issues/730 . In an ideal environment, the results are pretty much the same as a per-core benchmark, but I…
comment by alangpierce · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
Yes, you technically can write high-perf JavaScript code... https://github.com/alangpierce/sucrase/blob/153fa5bf7603b9a5... But freaking SIGH I don't want to. I prefer coding in environments that don't require unrolling loops by hand.
comment by notriddle · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
but the benchmark is stupid: https://github.com/alangpierce/sucrase/blob/main/benchmark/b... > Like all JavaScript code run in V8, Sucrase runs more slowly at first, then gets faster as the just-in-time compiler applies more optimizations.…
comment by merb · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
Sucrase is written in JS and boasts the highest line throughput of any competing transpiler https://github.com/alangpierce/sucrase Time Speed Sucrase 0.57 seconds 636975 lines per second swc 1.19 seconds 304526 lines per second esbuild…
comment by RyanCavanaugh · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
Sucrase is faster or really close to SWC (see rhe benchmarks https://github.com/alangpierce/sucrase ). Everyone still uses Babel because of the transforms. And yes, Babel can also be made faster if enough effort is dedicated into it. it's…
comment by longrod · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
…compared to sucrase (written in JS, currently faster than SWC and esbuild but doing somewhat less - https://github.com/alangpierce/sucrase ) tsc has in fact been designed with speed in mind (I've been following the project since before it…
comment by spion · 2022-01-25 · in I’m porting the TypeScript type checker tsc to Go -
▲ 2
Sucrase: A fast, pure-JavaScript transpiler for JavaScript/TypeScriptstory by yaaang · 2021-11-08 · 0 comments
-
▲ 2
Sucrase: A fast JavaScript/TypeScript transpiler written in JavaScriptstory by yaaang · 2021-11-07 · 0 comments
-
That's basically what Sucrase.js is: https://github.com/alangpierce/sucrase
comment by acemarke · 2021-10-26 · in Next.js 12 -
…allow this makes JS transpilers look much worse than they actually are in real-world projects. https://github.com/alangpierce/sucrase https://github.com/alangpierce/sucrase/blob/main/benchmark/b...
comment by hajile · 2021-05-20 · in Parcel 2 Beta 3 – improved build performance -
…Rust https://swc.rs/ But there is also sucrase which is fast because.. its written in TypeScript? https://github.com/alangpierce/sucrase
comment by spion · 2021-05-15 · in Modern Javascript: Everything you missed over the last 10 years (2020) -
…depending on how you manipulate them). These caveats are not reflected in Sucrase's benchmark. [0] https://github.com/alangpierce/sucrase#motivation
comment by lhorie · 2021-05-04 · in Announcing Rome Tools, Inc. -
…(written in TypeScript) has done a great job of being in the same ordinal of perf as esbuild: https://github.com/alangpierce/sucrase#sucrase
comment by orta · 2021-05-04 · in Announcing Rome Tools, Inc. -
…you need tramspiling for, you might want to look at Sucrase [1] as a fast alternative to Babel. https://github.com/alangpierce/sucrase
comment by inbx0 · 2021-04-28 · in Why we switched from Webpack to Vite -
The non-Twitter link: https://github.com/alangpierce/sucrase#readme
comment by mdaniel · 2021-04-22 · in Babel alternative in TypeScript that's 2x faster than esbuild -
…files as objects during development, and compiling them into one big binary for production. [0]: https://github.com/alangpierce/sucrase
comment by crazypython · 2021-02-16 · in Why Is Esbuild Fast? -
…that loads it directly from the filesystem, using a single-pass annotation remover such as https://github.com/alangpierce/sucrase A single-pass transpiler doesn't build an AST, instead just looping over everything once, which will surely…
comment by crazypython · 2021-02-16 · in Why Is Esbuild Fast? -
…but retain type checking when you do a full build. EDIT: Sucrase! That’s what I was thinking of: https://github.com/alangpierce/sucrase#transforms
comment by untog · 2020-06-09 · in Design Doc: Use JavaScript instead of TypeScript for internal Deno Code -
I think that’s the point. No plugin system. Compare Babel to Bublé or even Sucrase for example: https://github.com/alangpierce/sucrase Preparing data for external use always takes extra effort. You can build an efficient self-contained…
comment by turnipla · 2020-04-23 · in Incremental Builds in Gatsby Cloud -
…/github.com/gristlabs/ts-interface-builder https://github.com/gristlabs/ts-interface-checker Example: https://github.com/alangpierce/sucrase/pull/468/files
comment by alangpierce · 2020-02-01 · in TypeScript’s quirks: How inconsistencies make the language more complex -
…computations and often slower than JS when V8 is given multiple seconds to fully warm up the JIT: https://github.com/alangpierce/sucrase/issues/216 So really, it depends a lot on the use case. In my case, it's often a short-lived node…
comment by alangpierce · 2019-02-15 · in Replacing JavaScript Hot Path with WebAssembly -
I'd love to see Sucrase ( https://github.com/alangpierce/sucrase ) included in the performance comparison.
comment by kiliancs · 2019-02-10 · in Swc – Fast JavaScript to JavaScript compiler -
For those worried about compile time for large projects, tools like https://github.com/alangpierce/sucrase can go a long way for the transpilation (remove types), while you can use the TypeScript compiler in parallel only for the type…
comment by kiliancs · 2019-01-25 · in The TypeScript Tax -
Yep! Issue (already linked above): https://github.com/alangpierce/sucrase/issues/216 Most recent prototype branch (doesn't include some patches to AssemblyScript to get it working): https://github.com/alangpierce/sucrase/commits/assemblyscr…
comment by alangpierce · 2018-12-23 · in Speedy Web Compiler – A Rust port of Babel and Closure Compiler -
I've been working on a very similar tool, interesting to see some competition. :-) https://github.com/alangpierce/sucrase In my case, it's still running as JS, but rearchitected to solve the more straightforward problem where you don't…
comment by alangpierce · 2018-12-23 · in Speedy Web Compiler – A Rust port of Babel and Closure Compiler -
…and doing other nontrivial transformations. Regarding Browserify support, PRs are welcome. :-) https://github.com/alangpierce/sucrase/tree/master/integrati...
comment by alangpierce · 2018-05-29 · in Show HN: Sucrase, 20x faster smaller-scoped alternative to Babel -
See https://github.com/alangpierce/sucrase/issues/216 for some investigation I did into webassembly. V8 seems to be pretty good at optimizing your JS code if you give it long enough and write relatively C-like JavaScript in the first…
comment by alangpierce · 2018-05-29 · in Show HN: Sucrase, 20x faster smaller-scoped alternative to Babel -
Is there a good way to use this from Webpack? Edit: https://github.com/alangpierce/sucrase/blob/master/integrati...
comment by btown · 2018-05-29 · in Show HN: Sucrase, 20x faster smaller-scoped alternative to Babel -
▲ 88
Show HN: Sucrase, 20x faster smaller-scoped alternative to Babelstory by alangpierce · 2018-05-28 · 32 comments
-
…problem here. I've actually been hacking on a faster alternative to babel/tsc for simple use cases: https://github.com/alangpierce/sucrase . It has a built-in benchmark (`yarn run benchmark`) with at least one example of where typescript…
comment by alangpierce · 2017-12-29 · in Nearing the Babel 7.0 Release