View Full Version: calculate faster

C++ Learning Community > C++ in General > calculate faster


Title: calculate faster
Description: on a pc with higher speed processor


hydrowire - December 31, 2006 06:04 PM (GMT)
Lets say I write a c++ program that loop trough 1 to a million in a minute on computer A with a processor of 2 Ghz. Will it count faster if i run the program on computer B which has a processor of 3Ghz?

Lastly, will it count even faster if i run the same program on a cluster system with processors of speed up to 20Ghz?

It seems that the program that i write counts so slow but other program written by someone else count much more faster. It just appears to be, or they have another method faster than looping in c++?

Excaliber7388 - January 1, 2007 05:17 AM (GMT)
QUOTE (hydrowire @ Dec 31 2006, 06:04 PM)
Lets say I write a c++ program that loop trough 1 to a million in a minute on computer A with a processor of 2 Ghz. Will it count faster if i run the program on computer B which has a processor of 3Ghz?

Lastly, will it count even faster if i run the same program on a cluster system with processors of speed up to 20Ghz?

It seems that the program that i write counts so slow but other program written by someone else count much more faster. It just appears to be, or they have another method faster than looping in c++?

Yes, the faster the computer, the faster it can 'count'.
I made a "cpu speed test" a while back, it worked by checking the number of loops your processor could do in a few seconds. It's a crude measure of speed.




* Hosted for free by InvisionFree