Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Display your CPU's true speed' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Display your CPU's true speed
Authored by: rabbit on Jan 16, '04 06:15:08PM
I'm using a powerbook G4 867 mhz and my computer said that it was running at the slower clock speed. To test to see if there was any difference after resetting the PMU, i wrote the small simple program:

#include <stdio.h>

int main(int argc, char** argv) {
  double tmp;
  int i;

  for(i = 0; i < 10000000; i ++) {
    tmp = (i * i + i) / i;
    fprintf(stdout, "%f\n", tmp);
  }

  return 0;
}
I ran this after compling using gcc -O2 -o test test.c using the command line:

time ./test > /dev/null
Before the PMU reset, the test completed in 30 seconds, and after the PMU reset, the test completed in 27.5 seconds. This is a 9% difference. I ran the test four times in each case. As such, I think that it does make a difference. Does anyone have any suggestions for maintaining the faster speed?

[ Reply to This | # ]