Analysis updated 2026-05-18
Speed up a 3D math library by inlining vector operations and replacing array locals with scalar variables in hot loops
Reduce call overhead in a game engine's physics step by unrolling fixed-count loops and eliminating dead code
Optimize a TypeScript number-crunching module before shipping it as an npm package
Drop unused function calls from a bundle by marking pure helpers for tree-shaking
| isaac-mason/compilecat | corrode/refactoring-rust | doggy8088/leak-hunter | |
|---|---|---|---|
| Stars | 65 | 61 | 57 |
| Language | Rust | Rust | Rust |
| Setup difficulty | moderate | easy | easy |
| Complexity | 4/5 | 2/5 | 3/5 |
| Audience | developer | developer | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing Rollup, Vite, or Rolldown bundler setup to integrate the plugin.
compilecat is an experimental plugin that makes JavaScript and TypeScript programs run faster by rewriting specific parts of your code before your bundler (like Rollup or Vite) packages everything together. You add special comment annotations to functions or loops in your code, and compilecat uses those hints to apply low-level optimizations that would normally only happen in compiled languages like C or Rust. The four main techniques it applies are: function inlining, where a small helper function's body gets pasted directly at each call site to avoid the overhead of calling it, scalar replacement of aggregates (SROA), which breaks apart small arrays or objects like 3D vectors into individual variables so the JavaScript engine can track them more efficiently, loop unrolling, where a loop with a fixed number of iterations gets replaced by writing out each iteration explicitly, and constant folding with dead code removal, where values that never change get computed at build time and unreachable code gets stripped. The plugin works at the source-file level, transforming each file before bundling, and it understands code that crosses module boundaries. If you mark a function in one file with the @inline annotation, the plugin can pull its body into other files that import and call it, then drop the now-unused import automatically. compilecat is built around a Rust-based parsing and transformation core and ships as a pre-compiled native binary for each platform, with a WebAssembly fallback for environments that don't match. Installing it requires only npm with no extra build tools. The project is highly experimental. The README warns clearly that it is not yet stable and the API may change at any time. It is best suited for developers working on performance-sensitive JavaScript libraries, particularly those doing math-heavy work like 3D graphics, game engines, or physics simulations where reducing overhead in tight loops adds up noticeably.
An experimental TypeScript/JavaScript compiler plugin that rewrites hot code paths before bundling, using opt-in comment annotations to apply inlining, loop unrolling, and scalar replacement for faster runtime performance.
Mainly Rust. The stack also includes Rust, TypeScript, JavaScript.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.