Skip to main content

rust-performance-and-idioms

Make Rust fast and keep it idiomatic — the "measure first, then make it fast" skill. Profile before optimizing (samply, cargo-flamegraph, perf, Instruments, criterion); cut allocations (clone/to_string/collect, &str vs String, Cow, SmallVec, with_capacity, arenas); zero-cost iterators; SIMD (portable-simd, autovectorization, target-feature); cache-friendly layout (SoA, field order, repr, false sharing); Box<dyn> vs generics and inlining; async perf (spawn_blocking, executor starvation); Arc<Mutex> contention vs channels and sharding; binary size & compile time (LTO, codegen-units, opt-level, strip, cargo-bloat); and idioms (newtype, impl Trait, let-else, matches!, ?-errors). Use when a Rust program is too slow, allocates too much, the binary is too big, compiles too slowly, or a review wants idiomatic + fast code with evidence. NOT for first-time borrow-checker/ownership teaching (use rust-with-claude-code), GPUI/pd-console specifics (use gpui-rust-console), Tauri packaging (rust-app-distribution), or non-Rus

الانتقال إلى التثبيت

معلومات المصدر

المستودع
curiositech/port-daddy
آخر نشاط في المصدر
٢٦ يونيو ٢٠٢٦ في ٠٩:٣٣
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
٢
التفرعات
٠

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.