fast-anything profiles slow code so agents port hot functions to Rust
A new MIT-licensed repo profiles Python, Node, Ruby and other apps, ranks functions by time and portability, then has a coding agent rewrite only the slow ones in Rust with replay checks before enabling.
A GitHub project called fast-anything bets that you do not have to rewrite an app in Rust, only the small part that is slow. The repository, EL4CTEO/fast-anything, was created on 2026-11-21 and had 353 stars and 22 forks by 2026-11-22. It is MIT licensed and written mainly in Rust. Its pitch is that a coding agent can port hot functions to Rust one at a time while the rest of the app stays where it is.
The loop: scan, port, verify, enable
Install with npm i -g @el4cteo/fast-anything or cargo install fast-anything; ports compile with your own Rust toolchain through rustup. One command runs the loop: fast-anything go --agent claude -- python app.py, with the same shape for Node, Ruby, Java, Maven, Gradle, Go, PHP and C files.
The steps also run alone. scan ranks functions by time multiplied by how portable they are. port records up to 500 real calls and writes a one-function Rust crate plus a TASK.md prompt. verify release-builds the port and replays every recorded call. enable and disable swap the Rust in or out through one marked block removed byte for byte, bench times the whole app in interleaved runs, and report builds a card for a pull request. --agent takes claude, codex, or any command reading a prompt on stdin. Each port is a one-function crate, so compiles take seconds, and all ports share one .fast/target directory you can delete any time.
Nothing is enabled until it matches
Beyond the recorded calls, the tool derives extra cases and lets the original answer them: NaN, infinities, -0.0, zero and plus or minus one, non-ASCII text, empty inputs, inputs up to 16 times larger, and shrunk tiny and random slices. Values must match, with floats within 1e-9, and the port must raise errors where the original raises them. A port that is correct but slower per call than the original is not enabled either. The README gives one example: a port that compared bytes instead of characters was caught by 148 of 500 recorded calls. Setting FAST_ANYTHING_DISABLE=1 runs the original at any time.
The numbers the repo reports
Runs were on an i5-10500 with Windows 11, with C and C++ measured on a 4-core GitHub Actions Linux runner; the README says they can be reproduced from examples/.
| app | before | after |
|---|---|---|
| Python fuzzy dedupe, 700 names | 4.91s | 42ms (116x) |
| TypeScript fuzzy dedupe, 2,000 names | 3.11s | 155ms (20x) |
| PHP fuzzy dedupe, 600 names | 2.94s | 53ms (55x) |
| Go fuzzy dedupe, 3,000 names | 3.02s | 144ms (21x) |
| Ruby fuzzy dedupe, 400 names | 3.13s | 228ms (14x) |
| Java fuzzy dedupe, 4,000 names | 3.50s | 1.18s (3x; 11x on the function, rest is JVM startup) |
| C mandelbrot, 8 zoom levels | 431ms | 127ms (3.4x) |
| C++ fuzzy dedupe, 6,000 names | 3.02s | 1.09s (2.7x) |
The README notes that the tool ports the outermost loop it can rather than the small function inside it, so the app crosses into Rust once instead of millions of times. Porting only the inner levenshtein gave 35x and 1.9x.
What will not move, and what stays unclear
Only top-level, deterministic functions taking plain data qualify: numbers, strings, lists, dicts, typed arrays. In Java and PHP that means static methods and PHP functions, in Go plain functions, in C and C++ free functions and static methods. Entry-script code counts when it sits under if __name__ == "__main__": or if __FILE__ == $0, and scan reports why anything else cannot move yet.
Listed support covers Python 3.10+, Node 22+, Ruby 3.3+, Java 22+, Go 1.22+, PHP 8.1+ with the FFI extension, and C and C++. The other six go through a plain Rust library with one C entry point taking and returning JSON, so no headers or bindings are needed. A Claude Code plugin, an MCP server built into the binary with 8 tools, and a skill folder ship too.
The source does not say how functions with side effects are handled, how it performs when the hot path is spread across many small calls, or whether the speedups hold on typical web request handlers rather than the dedupe and mandelbrot examples.
What this means for AI-assisted builds
This suggests a shift in how performance work gets delegated: instead of asking an agent to rewrite a codebase in a faster language, you hand it a profiler's shortlist and a proof harness. The agent's job shrinks to one function with a test it must pass.
For Draftship users, the precondition is having the code. Draftship's paid plans include source code access and GitHub push, described in its GitHub and Vercel documentation, which is where a tool like this could be aimed at your own project. Draftship is not affiliated with this repository and does not include it.
Primary sources
- EL4CTEO/fast-anything: Don't rewrite it in Rust. Rewrite the 5% that's slow: profile Python, Node or Ruby apps, port the hot functions with your coding agent, prove they behave the same. · GitHub trending AI repositories, Nov 22, 2026
This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.