Skip to content

Some fun porting an algorithm from C to Rust. Check the README for more info

License

Notifications You must be signed in to change notification settings

mike-barber/rust-subleq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-subleq

Performance is better than I thought it'd be -- on par with clang, which achieved around 6.34s. The pattern-match version is slightly faster than clang with the target-cpu set in Rust; but the same might be true with clang in Windows, but I haven't spent much time trying to get it to work.

  • Ryzen 3900X, stock settings, eco mode.
  • Windows 10
  • Rust 1.45.2
  • target-cpu=haswell
    • seems like a pretty reasonable modern "standard"
    • nice performance uplift for the pattern-match algorithm
    • haven't had a good look why yet
  • cargo run --release
subleq traditional iter 0 time 6.3762761s
subleq traditional iter 1 time 6.3723992s
subleq traditional iter 2 time 6.4259712s
subleq traditional iter 3 time 6.4330779s
subleq traditional iter 4 time 6.3927956s

subleq match expression iter 0 time 5.6699585s
subleq match expression iter 1 time 5.6733616s
subleq match expression iter 2 time 5.6560155s
subleq match expression iter 3 time 5.6606645s
subleq match expression iter 4 time 5.6600197s

About

Some fun porting an algorithm from C to Rust. Check the README for more info

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages