This is an insufficient solution because std::function has a (small) bit of overhead compared to a raw function call. So it is not quite as efficient as simply using auto.
Am I the only one who would be excited if it hit Mars? I know that it almost certainly won't, but if it did, it could possibly give us great data regarding the possible origin of water on Earth.
Not exactly a fair comparison. I only trust banks because they are insured and if they "lose" my money then I will have recourse to recover it. With the online bitcoin exchanges, there is no such thing.
It's not just about "having enough RAM". While that certainly is a factor, it's not the only one. As you suggest, pretty much everyone has enough RAM to run just about any normal application with 64-bit pointers.
But if you want speed, you also have to pay attention to things like cache lines. 64-bit pointers often means larger instructions are needed to be encoded to do the same work, larger instructions means more cache misses. This can be a large difference in performance.
320 miles / 15 gallons = 21.33 MPG
250 miles / 15 gallons = 16.67 MPG
320 - 250 = a 70 mile difference in performance.
At 16.67 MPG, 70 miles equates to about 4.2 extra gallons needed to reach 320 miles. So for that person, using premium is like having an extra 4.2 gallons in his tank.
In my state, the best prices I could find for 87 and 92 gas were:
$2.83 for 87 and $3.11 for 92
$2.83 * 19.2 = $54.34
$3.11 * 15.0 = $46.65
So for every 320 miles he drives, he is basically saving $7.69. Not earth shattering, but definitely a win.
This is an insufficient solution because std::function has a (small) bit of overhead compared to a raw function call. So it is not quite as efficient as simply using auto.
Am I the only one who would be excited if it hit Mars? I know that it almost certainly won't, but if it did, it could possibly give us great data regarding the possible origin of water on Earth.
Not exactly a fair comparison. I only trust banks because they are insured and if they "lose" my money then I will have recourse to recover it. With the online bitcoin exchanges, there is no such thing.
It's not just about "having enough RAM". While that certainly is a factor, it's not the only one. As you suggest, pretty much everyone has enough RAM to run just about any normal application with 64-bit pointers.
But if you want speed, you also have to pay attention to things like cache lines. 64-bit pointers often means larger instructions are needed to be encoded to do the same work, larger instructions means more cache misses. This can be a large difference in performance.
I was curious, so I did some math:
320 miles / 15 gallons = 21.33 MPG
250 miles / 15 gallons = 16.67 MPG
320 - 250 = a 70 mile difference in performance.
At 16.67 MPG, 70 miles equates to about 4.2 extra gallons needed to reach 320 miles. So for that person, using premium is like having an extra 4.2 gallons in his tank.
In my state, the best prices I could find for 87 and 92 gas were:
$2.83 for 87 and $3.11 for 92
$2.83 * 19.2 = $54.34
$3.11 * 15.0 = $46.65
So for every 320 miles he drives, he is basically saving $7.69. Not earth shattering, but definitely a win.