Compiler magic sponsor match block optimize
⚓ Rust 📅 2026-06-21 👤 surdeus 👁️ 1I've been using a iced_gui crate and spamming match everywhere.
So, I wonder how rustc handle match block behind the sense.
(I've worried about branching)
but the result surprised me. rustc made it branch-less and using fn pointer instead.
llvm or rustc magic. I don't know but thank u.
P/s I had thought using map or vec. for handling update() but it's not necessary
1 post - 1 participant
🏷️ Rust_feed