58 ms·
That's not how that works. Rust can actually make power usage worse because it generates larger code sizes which causes more I-cache churn and thus more power u
by ilovecaching 4y ago
That's not how that works. Rust can actually make power usage worse because it generates larger code sizes which causes more I-cache churn and thus more power usage. Making efficient use of caches, power states, and reducing polling are all things that you don't just get for free because "I'm using Rust and Rust is efficient". Rust lets you write something efficient after you've spent tons of time working on making it efficient and understanding how power is consumed on a particular platform for a particular app.
Once again, you could just use a language where they do this for you in the runtime instead of trying to reinvent (probably poorly) these ideas yourself.
- vvanders 4y agoAt least on mobile SoCs that's exactly how it works, in fact due to how dynamic frequency scaling works it can be worse than 2x because to run at a higher frequency you need to run at a higher voltage. Your frequency increases(which drive switching costs) and you're paying more per current due P=IV. You're right in that not running the workload if possible is the best power savings but if you can't do that moving it to more efficient usage is a good way to make large inroads on power usage.