Don't rewrite it in Rust. Rewrite the 5% that's slow: profile your app, port the hot functions with your coding agent, prove they behave the same. Python, JS/TS, Ruby, Java, Kotlin, Go, PHP, C/C++, C#, R.
Rust agent-skillsai-agentsclaude-codeclaude-code-plugincodexdeveloper-toolsffimcpmcp-servernapi-rsnodejsoptimizationperformanceprofilerpyo3pythonrewrite-it-in-rustrubyrusttypescript
Satisfy clippy
EL4CTEO0c00cd54b744
diff --git a/src/php.rs b/src/php.rsindex 4feccdb..2941232 100644--- a/src/php.rs+++ b/src/php.rs@@ -133,7 +133,7 @@ fn hotspot(ctx: &Ctx, f: &Func, calls: u64, own: f64, cum: f64) -> Hotspot {/// Insert text right after the { of each function (same line: no line numbers move).fn insert_at(text: &str, mut at: Vec<(usize, String)>) -> String {- at.sort_by(|a, b| b.0.cmp(&a.0));+ at.sort_by_key(|a| std::cmp::Reverse(a.0));let mut out = text.to_string();for (offset, piece) in at {out.insert_str(offset, &piece);