|
||
---|---|---|
src | ||
.gitignore | ||
1_billion.log | ||
1_billion_with_multithread_rand.log | ||
1_milion.log | ||
1_milion_with_multithread_rand.log | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
rustfmt.toml |
graveler-softlockpicking-years-wasted-calculator
This repo is a short and sweet response to Austins most recent video 'The Science of Soft Lock Picking Pokemon' available here https://www.youtube.com/watch?v=M8C8dHQE2Ro
Programs
time
to record execution time
rustup
to install cargo, and all other tools used by the rust ecosystem
cargo
to compile the program
Building
cargo build --release
the built program will be stored under target/release
or target/debug
if you forgot to use the --release
flag (not recommended as there will be a significant performance hit due to additional debugging and status information, as well as additional runtime verification of the code)
you can also replace build
with run
to run the program after the compilation process is done, however this may interfere with any external timing software such as gnu time (see the Programs section) since it will include the compilation time and however long it takes for cargo to start the built program
Features
You can disable default features to switch to less performant code like so
cargo build --release --no-default-features
however this will require you provide a seed to seed the manual random implementation
cargo build --release --no-default-features -- 789124
to enable specific features just use the -F flag like so
cargo build --release --no-default-features -F auto_thread_count -- 789124
or
cargo build --release --no-default-features -F auto_thread_count,rust_random
Timings
1 billion
comparable to the python implementation: 39:12.67
multithreading and a better random library: 8:51.31
1 million
comparable to the python implementation: 0:04.40
multithreading and a better random library: 0:01.00