Rust and C use approzimately 1.00 J of energy and also the time for computational performance for both is approzimately 1.00 ms. However, when we consider Python, 70 times more energy and time is being used by python, comparitvely. From a sustainability, perspective this project considers should we move from Python to Rust. Rust and Python syntax isn't too different and thus we could save budget and be thoughtful towards reaching sustainability goals.
The functions that I will be using is an encrypt and decrypt cipher. I have a dataset that contains 1000 fortune cookies that contain hidden messsages. These messages are hidden by using the encrypt function to encrypt each of the messages and when someone uses my setup tool called "fortune" they will be able to get a randomly generated fortune that has been take from teh encrypted database and decrypted. The purpose of this project is to try and test to see the time and energy efficiency of doing this project in rust or python.
For testing in Rust and Python I used criterion and pytest-benchmark. Rust took 40 ms and Python used 15.2908 ms for the execution of encryption and decryption code. This shows that Rust is faster than Python.