Say you have two phones: one with crap software, and one from a company that spends time on writing proper, efficient software. If you run a stress benchmark, they will both be running at 100% CPU all the time and you'll only be measuring how much mAh is in the battery divided by how much power the CPU draws. All of this is information is already available in the product specification.
The only reason my Galaxy Note 2's battery life is any good (still the original battery which is, what, 5 years old now?) is because I did software tweaks to keep it from holding wake locks when apps are inactive.