Last active
July 19, 2018 22:49
-
-
Save friedmud/2dd0e9b08cf766c16b7cd95fbc74ceeb to your computer and use it in GitHub Desktop.
thermal_test.C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} | |
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!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!)