Yeah, I think the issue with batteries is actually even more similar to CPUs than you’d expect. Even on a “how much power is left” level, I think the software is trying to guess based on the voltage and some data about similar batteries. The actual amount of usable power is how much you can pull before the voltage drops to an unusable level, and that depends on things like manufacturing, age, temperature, the whims of chemical reactions, etc.
In the case of batteries, the software can make some reasonable assumptions and give you a helpfully-pessimistic estimate, but it’s hard to do that with CPUs since the possible range is so workload-dependent. In my matrix math / SIMD example, I’m doing 100% of the possible matrix math while using half the cores, but I could do some amount of other work using hyperthreads if it used the right resources. So the optimistic metric can overestimate by up to 100%, but that also means a pessimistic estimate would underestimate by up to 100%, and neither of those are particularly useful.
Even then, sometimes the assumption isn’t pessimistic enough and users will complain about e.g. their cell phone’s battery dropping immediately from 10% to 0% when they launch an app that causes the CPU to demand more current than the almost-dead battery can provide.
Yeah, I think the issue with batteries is actually even more similar to CPUs than you’d expect. Even on a “how much power is left” level, I think the software is trying to guess based on the voltage and some data about similar batteries. The actual amount of usable power is how much you can pull before the voltage drops to an unusable level, and that depends on things like manufacturing, age, temperature, the whims of chemical reactions, etc.
In the case of batteries, the software can make some reasonable assumptions and give you a helpfully-pessimistic estimate, but it’s hard to do that with CPUs since the possible range is so workload-dependent. In my matrix math / SIMD example, I’m doing 100% of the possible matrix math while using half the cores, but I could do some amount of other work using hyperthreads if it used the right resources. So the optimistic metric can overestimate by up to 100%, but that also means a pessimistic estimate would underestimate by up to 100%, and neither of those are particularly useful.
Even then, sometimes the assumption isn’t pessimistic enough and users will complain about e.g. their cell phone’s battery dropping immediately from 10% to 0% when they launch an app that causes the CPU to demand more current than the almost-dead battery can provide.