macintosh.world | Log In | Register

Today | News | Books | Recipes
Notes | QuickTake | Wiki | Browse
Maps | Reference | Reddit | YouTube
Chat | Games | About

GitHub - 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

Open Original Page

GitHub - 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

Products Platform GitHubRepository hosting, code review, and collaboration

CopilotAI coding agent for tasks, projects, and automated work

Build & Ship ActionsCI/CD and automation

Code QualityQuality analysis, fixes, and enforcement

CodespacesCloud development environments

Secure Code SecurityVulnerability detection and remediation

Secret ProtectionSecret scanning and leak prevention

Developers LearnDocumentation

BuildBuild with Copilot

ExploreTrending repos

Changelog Changelog Your source for the latest features, improvements, and fixes across GitHub products, all in one place.

Businesses By StageEnterprises

By IndustryHealthcare

Evaluate GitHubWhy GitHub

Add-ons GitHub Advanced SecurityEnterprise-grade code security

Copilot for businessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Resources Learn & ConnectDocumentation

SupportCustomer support

GitHub Universe GitHub Universe The event for developers, by developers - talks, workshops, and what's next for GitHub.

Sign up Appearance settings





You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.

Repository navigation

Security and quality

NotificationsYou must be signed in to change notification settings

Star794 (794)You must be signed in to star a repository

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.

www.npmjs.com/package/@el4cteo/fast-anything

agent-skillsai-agentsclaude-codeclaude-code-plugincodexdeveloper-toolsffimcpmcp-servernapi-rsnodejsoptimizationperformanceprofilerpyo3pythonrewrite-it-in-rustrubyrusttypescript

Code Open more actions menu

NameNameLast commit message

skills/fast-anything

skills/fast-anything

Repository files navigation

Don't rewrite it in Rust. Rewrite the 5% that's slow.

Rewriting a whole app in Rust costs months, minute-long compiles and gigabytes of target/. Most of the runtime sits in a few functions anyway.

fast-anything finds those functions, has your coding agent port only them to Rust, proves the port gives the same results on real recorded calls, and swaps it in. One command, fully reversible.

npm i -g @el4cteo/fast-anything # or: cargo install fast-anything

Ports are compiled with your Rust toolchain (rustup).

fast-anything go --agent claude -- python app.py # or: -- node app.ts / ruby app.rb / java App.java / mvn exec:java / gradle run / go run . / php app.php / clang -O2 main.c

command
what it does

scan -- <cmd>
profiles the app, ranks functions by time × how portable they are

port [id]
records up to 500 real calls, creates a one-function Rust crate + TASK.md

verify
release-builds the port and replays every recorded call

enable / disable
swaps the Rust in or out (one marked block, removed byte for byte)

bench
times the whole app, original vs Rust, interleaved runs

report
markdown + SVG card for your PR

doctor
checks Rust, your runtimes and your agents

--agent takes claude, codex, or any command that reads a prompt on stdin. Without it, hand TASK.md to whatever you use.

That port looked right but compared bytes instead of characters. 148 of 500 real calls caught it. On top of the recorded calls, fast-anything derives extra cases and lets the original answer them: edge cases (NaN, ±infinity, -0.0, zero and ±1, non-ASCII text, empty and up to 16× bigger inputs) and shrunk inputs (tiny and random slices). Nothing is enabled until every case matches: same values (floats within 1e-9), errors where the original errors. A port that is right but slower per call than the original (calling into Rust costs more than the work saved) isn't enabled either. FAST_ANYTHING_DISABLE=1 runs the original any time.

Real runs on an i5-10500, Windows 11 (C and C++: a 4-core GitHub Actions Linux runner). Reproduce them from examples/.

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×

Links

Open - Skip to content
Open - Sign in
Open - GitHubRepository hosting, code review, and collaboration
Open - CopilotAI coding agent for tasks, projects, and automated work
Open - ActionsCI/CD and automation
Open - Code QualityQuality analysis, fixes, and enforcement
Open - CodespacesCloud development environments
Open - Code SecurityVulnerability detection and remediation
Open - Secret ProtectionSecret scanning and leak prevention
Open - All Features

Browse another page:

URL