3 ms·
"@tveastman: I have a Python program I run every day, it takes 1.5 seconds. I spent six hours re-writing it in rust, now it takes 0.06 seconds. That efficiency
by 1vuio0pswjnm7 3y ago
"@tveastman: I have a Python program I run every day, it takes 1.5 seconds. I spent six hours re-writing it in rust, now it takes 0.06 seconds. That efficiency improvement means I'll make my time back in 41 years, 24 days :-)"
The example omits how long it took to write the Python script. Is it accounted for in the calculated result of "41 years, 24 days".
It also assumes that memory usage, CPU usage and storage space are not relevant to efficiency.
There are other languages faster than Python that one could try besides Rust. Other languages might result in less memory usage, less CPU usage, less storage space and faster completion.
- psychoslave 3y agoAlso if the script is used by a few million users, that’s a lot of man hour saved. Plus, things in software tend to layer, so as the article point, maybe the script itself can be waited for a second if this is your final top task you are manually calling, but if it occurs in a long chain of calls it participate in a delay inflation.