This is the code from my blog post “Speeding up Python programs with Rust: a practical example”.
ttst.pythe original ttst script, copied from this committtst_blaze.pythe new script as described in the blog post, differs only in thecogitate()functionchooser/Rust code
The original ttst.py is ready to use, refer to python ttst.py --help and its documentation for more information.
To run the updated ttst_blaze.py you must first compile the Rust library:
$ cd chooser
$ cargo build --release
$ mv target/release/libchooser.so ../chooser.so