- Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Rust and its pattern matching is fast, but not that fast ;)
Rustc 1.77 seems to be able to optimize the whole pattern_matching function to the equivalent of return 330.
Rustc 1.78 seems to be able to do the same optimization also for the dynamic_dispatch version.
See https://rust.godbolt.org/z/zTrzhTbze for the assembly output.
A possible improvement to the benchmark could be to change Action to take a parameter, and to tunnel the parameter value through criterion::black_box to avoid compiler optimizations based on that value.
RunDevelopment, Luk-ESC, meskill and ssddOnTop
Metadata
Metadata
Assignees
Labels
No labels