Jump to content

Anyone want to try my Rust-based "benchmark"?

Sileni

I've had some fun with a magic square program I wrote recently and would love to see how it runs on other processors. I've ran it on an R5 2600x and an R5 3500u, in both Linux and Windows. It tests every possible permutation of a set of numbers up to a given max to determine if they can form a magic square. It runs in parallel using Rayon with their base settings.

 

Source can be found on my GitHub. It's pretty straightforward, so I'm not posting a compiled version yet. Let me know if you'd like to see one.

Linux is significantly faster, probably because of how simple the inner function is. Currently don't have Linux results because I'm dual booted and saved my Linux results to an encrypted drive. Will post if there's interest. Results for a 3x3 square on the 2600x - Windows in the attached file. Compiled using

cargo build --release

Easiest way to run the program, and the way I ran the program for the results below, is

./msquare -ic //Linux

%CD%/msquare -ic //Windows

Then press Ctrl+C when you'd like to stop the run.

 

Logging (the -c flag) adds a bit of time for obvious reasons. Mostly curious about this for comparison purposes, and because I'm learning Rust.

 

Thanks!

test.csv

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×