#include <iostream> | |
#include <thread> | |
int main() | |
{ | |
double stuff = 1.2; | |
int junk = 2; | |
for (unsigned long int i=0; i < 100000000; i++) | |
{ | |
for (unsigned long int j=0; j < 100000000; j++) | |
{ | |
stuff *= 1.3; | |
stuff += 2.2; | |
junk *= 2; | |
junk += 2; | |
} | |
} | |
std::cout << stuff << std::endl; | |
std::cout << junk << std::endl; | |
return 0; | |
} |
Here are some results from my 2017 MBP with the i7-7920HQ (4 cores, 4 hyperthreads) clocked at 3.1 GHz with turbo up to 4.1 GHz. Ambient temperature is around 70F / 21C
First, on one core:
Now with 4 cores (by running in 4 terminals):
With 4 cores pegged... the fans are able to spin up and keep up with the thermal load... so the clock speed just sits at the max turbo it can achieve with all 4 cores going: 3.7GHz. There is no "thermal throttling" here.
But - let's try to load up the hyperthreads too... to see if we can put enough instruction pressure on the CPU to cause it to throttle. We'll do that by running 4 instances simultaneously... then, after it's up to temperature... we'll start up 4 more and see the effect...
As you can see - adding the 4 extra processes (8 total) pushes the CPU just a bit beyond its limit... causing it to throttle back to about 3.55GHz. But, overall, it's still able to keep up.
Now... all we need is someone to run this on the new 2018 MPB with the i9. If I had access to one I would do it myself! But I don't have one yet (maybe soon!)
Hi @friedmud!
Could you publish the results here when you have them?
I know you're waiting for someone with the new macbook to run it ;)
Thanks!
Definitive thermal throttling pressure test. This is in response to benchmarking being done on 2018 MBPs.
Note that the print statements are simply there to keep the compiler from optimizing out the rest of the computation. They should really never be reached.
Compile using:
Run in multiple terminals to put tons of pressure on the CPU using: