All postsSHORT6 min read
fast-anything: Your Coding Agent Ports Slow Python Functions to Rust
fast-anything profiles hot functions and checks Rust ports written by your coding agent. The README's own demos, the limits, and what a user reported.
Rewrite your Python app in Rust? Start by finding the slow function. GitHub user EL4CTEO created the fast-anything repo on Nov 21, 2026. It's a free, MIT-licensed command-line tool that profiles an app and checks Rust ports written by your coding agent.
What fast-anything does
Its tagline ends: "Rewrite the 5% that's slow." That's the author's slogan. Profile your app to find its hot functions.
The loop starts with scan: profile the app and rank functions by time and portability. port records, by default, up to 500 real calls and creates a Rust crate for the selected function, along with TASK.md for your coding agent. The selected hot function can bring the helpers it calls into the Rust crate. The agent writes the port. fast-anything builds it, checks recorded calls, and swaps in a matching port.
The commands expose the steps:
| Command | What it does |
|---|---|
scan |
Profiles the app and ranks hot functions. |
port |
Records calls and prepares a Rust crate and TASK.md. |
verify |
Builds the port in release mode and replays recorded calls. |
enable / disable |
Adds or removes the marked swap block. |
bench |
Times the whole app with interleaved original and Rust runs. |
report |
Produces Markdown and an SVG card for a PR. |
doctor |
Checks Rust, runtimes and agents. |
Your coding agent writes the Rust
The tool handles measurement, recording, builds, checks and swaps. Your coding agent handles the Rust implementation. The README accepts claude, codex, or any command that reads a prompt on standard input. You can also hand TASK.md to your agent yourself.
At the pinned commit, src/agent.rs launches the agent inside the port's crate folder. The claude preset runs:
claude -p --permission-mode acceptEdits --allowedTools "Read Edit Write Glob Grep Bash(cargo check:*) Bash(cargo build:*) Bash(cargo test:*) Bash(cargo fmt:*)"
The codex preset runs:
codex exec --full-auto -
Other --agent values are split on whitespace and normally launched directly, with the prompt on standard input. On Windows, an executable-not-found error triggers a retry through cmd /C for npm command shims.
There's also a Claude Code plugin:
/plugin marketplace add EL4CTEO/fast-anything
/plugin install fast-anything@fast-anything
/fast-anything:fast python app.py
The binary includes an MCP server:
claude mcp add fast-anything -- fast-anything mcp
Its 8 tools are fast_scan, fast_port, fast_verify, fast_enable, fast_disable, fast_bench, fast_report and fast_status. A skill file teaches the agent the loop.
The check before a swap
Alongside the recorded calls, the tool derives edge cases and shrunk inputs, then asks the original function for the expected answers. The README includes empty inputs, non-ASCII text, NaN, infinities and inputs up to 16× bigger. It compares values and expects errors where the original errors. For Python float results, the runner uses a relative tolerance of 1e-9 and an absolute tolerance of 1e-12.
The README says:
Nothing is enabled until every case matches
This is the default workflow; enable --force enables a port even if it hasn't passed verify (src/main.rs) and bypasses both the verify and slower-port gates. A match means the tool's own comparison on recorded and derived cases, which is a test and never a proof for every possible input.
It also says a matching port won't be enabled in the default workflow if the per-call cost is slower than the original. The README's own failed-port example involved comparing bytes where it should have compared characters. The README reports that 148 of 500 real calls caught that error.
Those are the README's descriptions and examples. We didn't install or run it. The user reports below show why I'd keep the application's own tests in the loop.
The README's results: the author's own runs
As of Nov 22, 2026, the README reported these results for the author's own example apps. These are the author's runs on an i5-10500 with Windows 11, with C and C++ running on a 4-core GitHub Actions Linux runner.
| App | Before | After |
|---|---|---|
| Python fuzzy dedupe (700 names) | 4.91s | 42ms, 116× |
| TypeScript fuzzy dedupe (2,000 names) | 3.11s | 155ms, 20× |
| PHP fuzzy dedupe (600 names) | 2.94s | 53ms, 55× |
| Go fuzzy dedupe (3,000 names) | 3.02s | 144ms, 21× |
| Ruby fuzzy dedupe (400 names) | 3.13s | 228ms, 14× |
| C# fuzzy dedupe (4,000 names) | 4.03s | 312ms, 13× |
| Java fuzzy dedupe (4,000 names) | 3.50s | 1.18s, 3× (11× on the function; the rest is JVM startup) |
| C mandelbrot (8 zoom levels) | 431ms | 127ms, 3.4× |
| C++ fuzzy dedupe (6,000 names) | 3.02s | 1.09s, 2.7× |
The Python demo finds near-duplicate customer names. Its app file calls this "the slow way" and generates 700 names. The implementation compares every pair using a pure-Python edit-distance function inside nested loops. The README's 4.91s to 42ms result measures that author's CPU-bound example.
The sources we read contain no independent verification of the table.
The catch
The results use the author's own examples and machine. Scope is also narrow: fast-anything ports top-level, deterministic functions that take plain data. Its skill file lists I/O, randomness and globals as reasons a function shows as not portable yet, and says to skip anything under 2% of the run. The skill also lists "lives in the entry script", but the README says entry-script functions can be ported when the main code sits under a main guard.
On Nov 22, 2026, a GitHub user showed in issue #4 that the check passed a port that did nothing for a function that changes its argument in place. The issue showed:
340/340 calls give the same result
The app then printed 0 where it had printed 496000. The 0.6.0 changelog says port now refuses functions that change their arguments in place, as seen while recording. The issue was closed on Nov 22. We haven't confirmed the fix.
In issue #9, the same user reported the Python check accepting an integer where the original returned a float. The 0.6.1 changelog says:
Python: verify tells ints from floats (#9)
The 0.6.1 changelog also says bench warns when an app prints different output with Rust ports. At the time we checked on Nov 22, that version was in the repo and npm's latest was still 0.6.0. We haven't tested those changes.
There were 7 GitHub releases in under 20 hours, from v0.1.0 on Nov 21 to v0.6.0 on Nov 22. That is the release pace at this snapshot.
A Hacker News commenter wrote:
Note that this strategy only works if 5% of your software is the problem - because of Amdahl's law.
The 5% is the author's slogan; the gain depends on how much of the runtime sits in the ported function.
Another Hacker News commenter wrote:
In my dayjob(s) I've basically never seen major slowness that comes from using something like nodejs / python, the bigger culprits have been network / db / bad architecture or code.
My take: profile before choosing the work. The table describes the author's examples; your measurements determine whether a Rust port belongs in your app.
How to try it carefully
We haven't installed or run it, and the repo was created Nov 21, 2026. My suggested approach:
- Work on a branch. Install with
npm i -g @el4cteo/fast-anything. It needs a Rust toolchain (rustup). It was 0.6.0 on npm when we checked (Nov 22). - Profile the app and review the hot function. The README's combined command is
fast-anything go --agent claude -- python app.py; the separate commands let you inspect each step. - Read
TASK.mdand the Rust port your agent writes. Keep the recorded-call and derived-case checks. - Run your own tests. Compare the whole app's before/after behavior and timing.
- Keep the off switch:
FAST_ANYTHING_DISABLE=1runs the original. Thedisablecommand removes the marked swap block. In Python, enabling adds a marked block to the function's module (for an entry script, before the main guard).
Free to install, MIT licensed. Any coding-agent costs depend on the agent, provider and plan you use. The README lists no price for fast-anything.
The builder angle: my opinion
I'd sell a fixed-scope speed-up job to a team with a slow Python, Node or Ruby script. Profile it, port the hot function with a coding agent, keep the recorded-call check, and run the client's own tests. Deliver the before/after report and the off switch.
No promised speedup. This is my opinion, with no income guaranteed.
Daily email
Get each breakdown in your inbox.
One email each evening, right after the Short goes live: the AI tool it covers, the full write-up with sources, and how to get paid for it. Free, and you can unsubscribe anytime.