Page 1 of 1

Speed test (AKA completely useless script)

Posted: 12 Aug 2009 06:56
by Muroph
this script just counts the number of iterations of a simple loop in a period of 20 secs, then displays the total and average.

i wrote it even before loops were implemented, to test my stack limit work-around.
the poor thing had been forgotten in my old_scripts folder for months. :cry:
until i found it today, and decided to update it and post here just for fun. :)
quoting TheQwerty:
Scripting can be so fun (and arguably entirely useless) sometimes.. :P
:lol:

Code: Select all

"Speed Test"
	msg "Start speed test.<crlf><crlf>This takes 20 secs to complete<crlf>and will use a lot of CPU power.",1;
	$total=0;
	$done=1;
	$sec=<date ss>;
	while($done==1){ //wait 'till the next full second to start
  		if(<date ss>!=$sec){
  			$sec=<date ss>;
  			$done=0;}}
	while($done<20){ //the test loop
		if(<date ss>!=$sec){ //if the seconds has changed, update the timer values
			$sec=<date ss>;
			$done++;}
		//status $total; //test speed of status bar messages
		$total++;} //total iterations
	$hz = ($total/20);
	msg "$hz Hz ($total loops in 20 secs)";
my average: 4053.2 (core 2 duo @ 2.8ghz, 50% CPU)
pretty good compared to my old cpu.

Re: Speed test (AKA completely useless script)

Posted: 12 Aug 2009 08:13
by admin
:)
3308.3 Hz (66166 loops in 20 secs)
Athlon 64 X2 Dual

Re: Speed test (AKA completely useless script)

Posted: 12 Aug 2009 09:34
by noodles
3018.5 Hz on a more than 5 years old AMD Sempron (which was the cheapest CPU I could find when buying it and really has a very poor performance).
So I think (comparing my result with your results on up-to-date CPU) the test is not really that meaningful. But fun nevertheless ;-)

Re: Speed test (AKA completely useless script)

Posted: 12 Aug 2009 10:20
by Muroph
noodles wrote:So I think (comparing my result with your results on up-to-date CPU) the test is not really that meaningful. But fun nevertheless ;-)
but don't forget that xy is not multi-threaded, so if i have 2 cores @ 2.8ghz it will only use 50% of the maximum processing power.
btw, i ran the test with 57 background processes, including winamp and some 8~10 downloads in various apps, and this doesn't seem to affect the test at all.

in my 5-year old P4 @ 2.8ghz (and almost 75°C :lol: ) i used to get smth between 2700 and 3000.