Sign in with
Sign up | Sign in
Your question

Bored, so i wrote a simple benchmark.

Last response: in CPUs
Share
March 12, 2007 11:23:18 PM

I was bored, so I wrote a simple/small cpu benchmark that tests the dual precision floating point performance of your CPU.

I wrote it in Visual Basic 6

If you run it, please post your score as well as your CPU. Keep in mind that it is NOT multithreaded, so having multiple cores will not benefit this benchmark.

here is the download link: http://h1.ripway.com/bsfoltz/simplebench.exe


My desktop:
Athlon 64 3700+ @ 2.4
Score: 1225

My laptop:
Turion 64 X2 @ 1.6
Score: 745

My fileserver
Pentium 3 @ 500mhz
Score: 237

Im interested to see how accurate my benchmark is, as well as to just generally see some scores of CPU's other than my own.
March 12, 2007 11:32:44 PM

My E4300 topped out at 792.

Wonder what I'd get if I do that mod DaSickNinja reccomended.
March 12, 2007 11:34:03 PM

That seems odd that a c2d would score lower than my A64..... do you have any demanding apps running in the backround like a game or copying files.... etc?
Related resources
Can't find your answer ? Ask !
March 12, 2007 11:37:43 PM

I've got quite a few things going. Turned off the one program that was maxing out my CPU. Another account running on this computer uses about 5% of the CPU resources at all times, too.

714 is what I'm getting with my normal programs running.
March 12, 2007 11:38:59 PM

Score: 1249.9627

P4 3.0 Northwood HT Stock

Edit:

And the score fluctuates..

Did get 1258, then 1275, then back to 1249. Not really running hardly that much in the background.
March 12, 2007 11:39:32 PM

Just a warning about executing programs. I appreciate his effort but I choose not to download and execute the file because I don't know the person who made it and don't have the resources to determine what it does.
March 12, 2007 11:39:52 PM

1355 +/- a couple points over 5 runs.

Athlon 5000+ with 2 gigs ram.

Interestingly, I ran it with a virus scan going in the backgound and score only dropped to 1351.

Guess this dual core stuff actually works :) 

Just as an aside, why is my computer now dialing a 1-900 number in central America?

And for that matter, I don't remember ever actually visiting any of these port sites that keep popping up on my browser all the time now...


















Just kidding...... :)  :)  :) 
PS - It's real simple VB, couple timed loops is all.
March 12, 2007 11:40:11 PM

Quote:
Just a warning about executing programs. I appreciate his effort but I choose not to download and execute the file because I don't know the person who made it and don't have the resources to determine what it does.


You know, I was thinking the exact same thing. Then I figured... what the hell, this is Vista, damnit. :lol: 
March 12, 2007 11:41:06 PM

I can assure you, it is not a virus. If it would re-assure you if i posted the source code here, just tell me and I will.
March 12, 2007 11:43:02 PM

Avast! showed nothing wrong with it, so I also thought WTH.. :lol: 
March 12, 2007 11:43:54 PM

For those that can compile it I'm sure it would help immensely. For those that can't and don't understand such things, might be fun reading.
March 12, 2007 11:49:24 PM

Quote:
I can assure you, it is not a virus. If it would re-assure you if i posted the source code here, just tell me and I will.


Sorry, I hope I didn't come off as accusatory. It was just meant as a reminder that anyone could come here and post up 9 or 10 posts then create a thread that links to a program that benchmarks your computer and also does other things like steal information, etc...

I do think you are sincere and I am in no way trying to cast doubt on your hard work, I just want everyone to be aware that if they want to download executables here that ANYONE posts they should do so with some risk in mind.
March 12, 2007 11:50:34 PM

Quote:
I can assure you, it is not a virus. If it would re-assure you if i posted the source code here, just tell me and I will.

I would be interested in the source code. In my spare time, I could go about making the program multithreaded, and that way, my X6800 and QX6700 will pwn you all...
March 12, 2007 11:50:39 PM

I wrote it in 5 minutes so its nothing special:


[code:1:7bf89a2c03]
' this goes in a module

Public Declare Function GetTickCount Lib "kernel32" () As Long
[/code:1:7bf89a2c03]

[code:1:7bf89a2c03]
'the rest of this goes in form1

Dim i As Long
Dim p As Double
Dim k As Double
Dim l As Double
Dim z As Double
Dim tickc As Long
Dim starttick As Long
Dim brun As Boolean

Private Sub Form_Load()
starttick = GetTickCount

p = 3.14159


brun = True

Do While brun = True

i = i + 1

k = p * (p + i)
l = (k * p)
z = l / k
l = z * (k + p)

tickc = GetTickCount

If tickc >= starttick + 1000 Then
brun = False
MsgBox "Score: " & (i / 10000)
End
End If

Loop

End Sub
[/code:1:7bf89a2c03]

Im open for suggestions if anyone has ideas to improve this one or make a different one :p 

edit:

Quote:
I would be interested in the source code. In my spare time, I could go about making the program multithreaded, and that way, my X6800 and QX6700 will pwn you all...


If you know how to multithread applications with vb6, id very much like to be shown how :p 
Anonymous
March 13, 2007 12:19:01 AM

i got 1255 for pentium D 930
Anonymous
March 13, 2007 12:21:06 AM

multithreaded would be good because i saw it using only one core
March 13, 2007 12:26:49 AM

I'm still learning just like you. But I'll let you know when I get it right.
March 13, 2007 12:34:52 AM

1667 for E6400@ 3.2ghz.
Anonymous
March 13, 2007 12:52:21 AM

you are stupid (DaSickNinja) all i said was multithreaded is a good idea. as you said u can help this guy in doing that and you start you stupid ass answer for no reason what wrong with you. read my thread again i didn;t mean to ofened you. lol. chill
March 13, 2007 1:01:17 AM

Quote:
you are stupid (DaSickNinja) all i said was multithreaded is a good idea. as you said u can help this guy in doing that and you start you stupid ass answer for no reason what wrong with you. read my thread again i didn;t mean to ofened you. lol. chill


I think he was talking to me... as in he doesnt know how to multithread apps in vb6 yet either...
Anonymous
March 13, 2007 1:03:08 AM

well then i am sorry.
March 13, 2007 1:16:18 AM

Quote:
you are stupid (DaSickNinja) all i said was multithreaded is a good idea. as you said u can help this guy in doing that and you start you stupid ass answer for no reason what wrong with you. read my thread again i didn;t mean to ofened you. lol. chill

What?
March 13, 2007 1:22:38 AM

1259.6535
March 13, 2007 1:30:28 AM

I found this on making Multi threaded VB programs:
Quote:
Introduction

Back in the days of VB 6 and earlier, writing a multithreaded VB application was hard. MS even told ambitious VB developers not to do it, the hacks required were not going to be supported, endorsed, blessed, etc. No soup for you.

With the release of VB.NET, we VB developers finally get to play. I'll take you through the basics to get you started. Once you have made your first multithreaded application, you will officially be 'dangerous.'

I've done my best to keep my explanations straightforward and accessible, but be forewarned that multi-threading has a few hairy issues to grapple with, it will probably take a couple reads through this article and some tinkering in VB.NET before the topics I touch on here make thorough sense. Besides that, we're mearly scratching the surface of many of the concepts and techniques that VB.NET supports. When you are ready for more, MSDN is a good place to start.
What is a Thread?

Threads are like employees at a company. In your typical company, each employee can be working at the same time. The company is the process which contains all the threads working in it, and which organizes them towards a common purpose. When you write an application and run it, you are starting a process with a single thread. So, your application can do one thing at a time (it's a company with one employee). Your variables and objects are like the copier and fax in an office...some things are global and shared by everyone in a company while others are private, residing in the office of one person or department.

A modern operating system allows you to run a number of programs at the same time, each of which has one or more threads. If you have one processor in your machine, these processes (aka applications) and their threads aren't necessarily running at the exact same time. Typically the OS let's the first process run on the CPU for a fraction of a second, then it let's the next one run for a fraction of a second, and so on, creating the illusion than lots of things are happening at the same time. When the OS let's a process run, that process then gets to decide which thread it wants to give time to first, then it gives time to the next, etc, much as the OS does with processes.

However, with certain recent processors, and with multi-processor machines running a multiprocessor aware operating system like Win2k or WinXP it is possible for two processes and possibly two or more of their threads to be running at the exact same time.
Why Use Multithreading?

Multithreading is useful for a number of reasons. Your application may need to respond to external events. When the external event happens, it creates a new thread to handle it appropriately without preempting freezing the rest of your application. If you have a timer control in your VB.NET app, guess what? You have a multithreaded application!

I've used threads in my applications to handle tasks in the background without freezing up my application's interface while things are processing. When the task is done, it updates a variable in my application so the main thread will be able to tell that it's done.

You may be writing a service that need to keep track of several different things at the same time. Threads let you juggle a lot of tasks and events simultaneously.

One Fax At a Time

Having two threads working at exact same time is great! But like the employees that try to stuff paper into the shared fax machine at the exact same time, threads can cause problems when they use shared resources.

Let's say you have a global variable called "intWebHits" that helps your program track the number of hits to your website. And let's say you are running two threads that do the same thing, each tracking a different part of the website but recording hits to the same global variable:
[code:1:a0e754e8e5]Sub IncrementWebCount()
intWebHits += 1
Console.WriteLine(intWebHits)
End Sub[/code:1:a0e754e8e5]
Each time either thread gets a hit, it prints out the total number of hits so far and then it increments intWebHits. What happens if you get 2 web hits at the same time? On a machine that can run 2 threads at the same time, you could end up running each line of the above code with each thread at the exact same time. So if the total for intWebHits were "129" before the simultaneous hits, both threads would run that first line of code at the same time, both incrementing the total and both printing "131" OR both printing "130" depending on factors outside your control or ability to reliably predict. What you wanted was 130 then 131; instead you got 130 and 130 or 131 and 131. If you have a machine that can only run one thread at a time, you could still be in trouble. What if you run line 1 on the first thread, then that thread is paused and the second thread is given the CPU to run on for its share of time? It will run its copy of line 1. Then it will run line 2. Then the first thread gets its turn again. It run's its copy of line 2. What is your output? 131 and 131. Again, not what you wanted. This behavior may be fairly harmless with a webcounter, but you can probably imagine writing programs where being off by 1 here and there is not acceptable.

The wise people that make operating systems and compilers recognized this problem and they have provided us with a way of dealing with it: resource locks. A resource lock allows a thread to claim control of a variable and to be guaranteed that no other thread will have a lock or be able to do anything to that locked resource at the same time as the thread that has placed a lock on it. Any other thread that needs access to that variable just has to wait its turn. It even works with multiprocessor system.
[code:1:a0e754e8e5]Sub IncrementWebCount()
SyncLock objMyLock
intWebHits += 1
Console.WriteLine(intWebHits)
End SyncLock
End Sub[/code:1:a0e754e8e5]
Now when those threads run at the same time, they will each try to get a lock on the object "objMyLock" but only one will get it, the other one will wait until the lock is off "objMyLock" before it will run. BTW, objMyLock can by any object you care to use for a lock.

But these locks have problem of their own. Consider the following:
[code:1:a0e754e8e5]Sub IncrementWebCountA()
SyncLock objMyLockA
SyncLock objMyLockB
intWebHits += 1
Console.WriteLine(intWebHits)
End SyncLock
End SyncLock
End Sub

Sub IncrementWebCountB()
SyncLock objMyLockB
SyncLock objMyLockA
intWebHits += 1
Console.WriteLine(intWebHits)
End SyncLock
End SyncLock
End Sub[/code:1:a0e754e8e5]
Notice that we have two slightly different routines. The first routine tries to get a lock on objMyLockA first and then it tries for a lock on objMyLockB. The second routine tries for a lock on B, then on A. If these two routines were to run at the same time, the first routine would get a lock on objMyLockA at the same time that the second routine would get a lock on objMyLockB. The first routine needs a lock on objMyLockB in order to continue. The second routine needs a lock on A. They both have something the other needs to continue, but neither will give up the lock it holds until it gets the lock it needs to complete. So, these threads would essentially stop working. This is what's known as a race condition. You don't want one of these...so be careful not to have interlocking locks like that in your code. These examples are simple, but if you have locks all over you application and routine calling other routines from within a lock protected area of code, you can end up with this problem without it being something as easy to identify on a read through as it was here.

And one more thing. Some objects and structures built in to .NET are multithread safe (they don't require a lock to function, though you may still need one depending on how you use it) and some are not. Integers are multithread safe, so you can read and write them with two different threads at the same time, but you could have issues like those we talked about earlier...it may not give you an error, but it probably isn't going to behave in the way you were hoping for either. Collections, as an example, are not multithread safe. If you have two threads try to read a collection at the same time, you will most likely get an error. The .NET documentation usually tells you if something is thread safe.

If it's an option, run routines in your thread that don't access shared variables at all. You won't need locks and you won't have to worry about avoiding or debugging race conditions! The issues related to shared variables and the order in which threads are running are know collectively as "Thread Synchronization" issues.

Cut To The Chase

Now that you know to avoid using shared variable without locks, and to avoid race conditions whenever you use locks, you are ready for the code!
[code:1:a0e754e8e5]Dim thrMyThread As New System.Threading.Thread( _
AddressOf IncrementWebCountA)
thrMyThread.Start()[/code:1:a0e754e8e5]
Yah, that's it. These two lines create a new thread running the IncrementWebCountA routine. You can set the priority of the thread and do other cool things with it, but that's the basic usage right there. One point to note is that the starting routine must require no parameters in order to be used to start a thread.

Whenever you run a program in VB, you specify a "startup object" like form1. That's where your "main" thread begins...the one that starts your application, sets up the forms, sets up the global variables, etc. It's your first employee. Will you add more? :) 

http://209.85.165.104/search?q=cache:lN9qbpb1M84J:www.c...
March 13, 2007 1:38:08 AM

I get a score of ~954 on my AMD 2400+Thoroughbred with 512MB of ram 8O





Lol it must be my GeForce4 Pwnage.......jk
a c 100 à CPUs
March 13, 2007 1:40:23 AM

Hmm, would it be fair if I wrote it in C? :D 
March 13, 2007 1:41:27 AM

I scored 1890
March 13, 2007 1:44:41 AM

sorry my specs e6700 @ 3.52
March 13, 2007 1:47:06 AM

How bout C#?
March 13, 2007 1:47:14 AM

Too bad i use vb6 and not vb.net.... i guess its no soup for me :p 
March 13, 2007 1:47:21 AM

My Laptop:
Core Duo 2400 @1.8Ghz
Gets- 904

My (Temporary :D  ) Desktop:
Athlon (Orion) @ 700 mhz
Gets- 374

(My Athlon XP crapped out on me :evil:  )
a c 100 à CPUs
March 13, 2007 1:51:13 AM

I don't know C#. Plus, AFAIK it only works on Windows.
March 13, 2007 1:55:01 AM

I don't know C that well (still a student)
March 13, 2007 1:55:30 AM

Very cool. I realize the difficulty in making programs multi-threaded, but one that was would be very neat. That being said...

1.7Ghz Core Duo notebook: 922
March 13, 2007 2:03:34 AM

Northwood 3.4

Score: 1591 :!:

Not a bad showing for the old 13 micron Netburst. As a matter of fact I'm close to the top (so far of course, and yes I know it's early)
March 13, 2007 2:24:18 AM

The Top Five

Tinman69 1890
DaSickNinja 1826
JumpinJack 1761
Derek2 8O 6 1667
Zorg 1591



(I got 8th :cry:  )
March 13, 2007 2:33:52 AM

Here's what it would be in C++:

Quote:
#include<iostream>
#include<windows.h>
using namespace std;

int main()
{

long i, tickc, starttick;
double p, k, l, z;
bool brun;


starttick = GetTickCount();
p = 3.14159;
brun = true;
i = 0;

while (brun = true)
{
i = i + 1;

k = p * (p + 1);
l = (k * p);
z = l / k;
l = z * (k + p);
tickc = GetTickCount();

if (tickc >= starttick + 1000)
{
brun = false;
cout << "The Score is: " << (i / 10000) << endl;
system("pause");
break;
}

}

}



Hope that helps somebody.....
Unfortunately, the scores don't seem to be compatible with each other....
(^Yes, I programmed that :D  ^)
March 13, 2007 2:42:21 AM

Quote:

1761 using a 3.33 GHz E6700....

1826 for an X6800 @3.4Ghz

@sirrobin4ever
Thanks much.
March 13, 2007 2:42:22 AM

I got ~167.5

AMD K6-III+ 400 MHz running at 380 MHz.
PCChips Motherboard
512 MB RAM
March 13, 2007 3:07:07 AM

Quote:
AMD K6-III+ 400 MHz running at 380 MHz.


Why in the world would you run it at 380?
March 13, 2007 3:27:28 AM

Quote:
AMD K6-III+ 400 MHz running at 380 MHz.


Why in the world would you run it at 380?

My uncle runs his Athlon 700 at 600. He thinks overclocking is bad and damages everything so he runs it slower to last longer. Kind of weird.

Ima put my C2D at 3.55 (highest I've reached before) tomorrow and post new score.
March 13, 2007 3:33:43 AM

I just tried to see how close I could get too the 2000 k marks
got 1945 e6700 @ 3.68
a b à CPUs
March 13, 2007 3:35:33 AM

Quote:
you are stupid (DaSickNinja) all i said was multithreaded is a good idea. as you said u can help this guy in doing that and you start you stupid ass answer for no reason what wrong with you. read my thread again i didn;t mean to ofened you. lol. chill

You just called the Ninja stupid...

HEATHEN CHILD!!!!
March 13, 2007 3:35:37 AM

See if i can reach 2k. Do you guys think 1.6v+ for just like 20 mins would harm things?
a b à CPUs
March 13, 2007 3:39:04 AM

You know that source code could have been worth thousands in a few years after some professional development, and you just posted it on here like its nothing? Its good for us but how do you know I wont compile it and put it up on the net under my name? Still thanks for it anyway. Just dont do that with a larger and more valuable program lol coz someone is bound to steal it.

EDIT: At least we know that if we compile that code it isnt going to send our bank details to india. :wink:
March 13, 2007 3:39:18 AM

1142 on 4400+ X2.
March 13, 2007 3:40:22 AM

I just ran mine at 1.475 vcore to get 3.68, I could go higher but am also worried about damaging it, what the hell, i took it too 3.80 1.50 vcore
1998 score
March 13, 2007 3:47:51 AM

Using JumpingJack's program improvements he suggested, the C++ variation I have constructed DOES yield a higher score.

So, using my laptop;
Core Duo 2400 @ 1.8ghz
My VB score is 904.
My original C++ score is 3455.
My revised C++ score is 4005.

Perhaps this is an improvement in the code indeed!

Here's my new code:
Quote:
#include<iostream>
#include<windows.h>
using namespace std;

int main()
{

long i, endtick, starttick;
double p, k, l, z;
bool brun;

starttick = GetTickCount();
p = 3.14159;
brun = true;
i = 0;

endtick = GetTickCount() + 1000;

while (GetTickCount() <= endtick)
{
i = i + 1;
k = p * (p + 1);
l = (k * p);
z = l / k;
l = z * (k + p);
}
cout << "The Score is: " << (i / 10000) << endl;
system("pause");
}


I really wish that I could post the .exe on here...but alas, I know not how to get the .exe out of Visual Studio...let alone on the forum.
March 13, 2007 3:54:22 AM

Quote:
my X6800 and QX6700 will pwn you all...


oohh mr. tough guy :p 

i scored an 1100 on a 3700 at stock.

my cough **fx60 computer has a bad hdd** :cry: 


i think/hope :?
March 13, 2007 3:57:41 AM

Desktop
Fx-60 stock 2.6 ghz
1 gig ram
score: 1392.7832

Laptop
Turion Ml-32 stock 1.79 GHZ
512MB ram
score:892.0128
:oops: 
!