AI Weekly Malaysia

Back to items Summaries

Fast-Anything: Don't rewrite it in Rust. Rewrite the 5% that's slow

ID
49310
Status
summarized
Published
22 Nov 2026, 12:10 PM
Fetched
23 Nov 2026, 8:15 AM
Provider
Hacker News
Category
dev-community
Original URL
https://github.com/EL4CTEO/fast-anything
Source URL
https://hnrss.org/best

Summary

Score
7.5
Created
23 Nov 2026, 8:16 AM
Tags
Audience
developersvibe_codersai_agent_users

What happened

fast-anything is an open-source CLI (npm i -g @el4cteo/fast-anything, or cargo install) that profiles a running Python, Node/Bun/Deno, Ruby, Java, Go, PHP or C app, ranks functions by time × portability, and has a coding agent port only the slow ones to Rust. Its pipeline is explicit: scan, port (records up to 500 real calls and generates a one-function Rust crate plus TASK.md), verify (release-builds the port and replays every recorded call), enable/disable (swaps the Rust in or out via one marked block, removed byte for byte), bench and report. The repo sits at 1.9k stars / 110 forks, with 176 points and 148 comments on the Hacker News thread.

Why it matters

Before anyone on your team proposes a full rewrite, run the scan step on your slowest service — the tool's premise is that runtime concentrates in a few functions, so the deliverable is a one-function crate with a recorded-call regression suite, not a new codebase. The 500 recorded calls and the byte-for-byte reversible enable/disable block are the parts to actually use: they give you an equivalence check and an instant rollback, which is what makes an agent-written Rust port reviewable. Budget for the ongoing cost the README does not solve — you now maintain two implementations of that function, and every future change must pass the replay suite. Nothing in this text is Malaysia-specific.

Discussion angle

Where does the FFI boundary eat the gains? Ask people who have shipped PyO3 or napi-rs extensions whether a single ported hot function actually beat the original under the interleaved bench, and what the crossover point looked like.

Top