I must be doing something wrong I keep getting it can not find the path specified
When I used the command line the program was in the folder automatically specified, so I only had to type in thgbench. Just move it to the folder where your command prompt directs you to, should be fine then.
I set it to the maximum. Made the most sense. I figured most processors shouldn't have too much trouble doing that, and would show somewhat of a comparison between single, dual, and quad cores.
Is that on your phase change, or is it not done yet? I'm pretty sure since you seem to have a good chip that you will hit the magic 8ghz (done on a p4 anyways, but more realisticly, 5.3ghz probably tops)
Hey, thanks for the code, cerathalis. Welcome to the forumz.
Thank you, might as well make my first post on some C++ code.
Quote :
it could turn into the THG Forumz open source benchmarking suite
Wouldn't that just be sweet!
I tried out cerathalis' code, and it most definitely works. I'd like to post the .exe here, but I still don't know how to build the windows.h into the .exe. Can anyone tell me how to do this?
Good to hear that it works; the # of threads can be increased or made dynamic pretty easily if anyone wants.
Quote :
Thank you very much for the multithreaded version, per thread it does perform a good bit better than my original vb6 version.
My Turion 64 X2 @ 1.6 scored: 4293 on your mulithreaded version using 2 threads
And im still working on my more complete bench, which should be done late tonight or tomorrow
That could be a fun project, if you thread something you may want to use objects more like what Whizzard9992 did in his VB code. The C++ code was thrown together pretty quick after lunch during work.
Dude Here are my VB6 code scores:
Acer 3100 notebook Semperon Mobile 3400+@1.8GHz = 763 (Vista Home)
Game rig Opteron 154@2.830 GHz = 1429 (W2K SR4)
Audio Server Semperon 2800+@1.99GHz = 873 (W2K SR4)
All systems running their normal background processes (beaucoup)
Here are my C++ (Jack's code) scores:
Acer 3100 notebook Semperon Mobile 3400+@1.8GHz = 2953 (Vista)
Game rig Opteron 154@2.830 GHz = 6278 (W2K SR4)
Audio Server Semperon 2800+@1.99GHz = 4273 (W2K SR4)
It appears that C++ is 4.4x faster execution than VB6, and likely faster yet than VB.net.
BTW, Vista is absolutely a friggin total PIG ... inane insane security and it seems all utilities-tools have: changed name(s), vastly reduced capabilities, and changed their location within the Windows environment. A brand new Vista Home on a new notebook has 68 processes running just to boot the SOB! In my considered opinion Vista is a piece of sh*t!
My vote is for Apple, now X86 OS, to entice Windows app developers (Adobe, IBM-Lotus, Sony-SoundForge, Symantec, etc.) to port all their stuff to Apple. Then, I'll ditch Microsoft's POS OS's forever. I actually like W2K, but it's now off MS support and we know historically every MS OS release gets bigger, uglier, and much more resource intensive, while losing performance compared to the previous OS! What a crock!!
Okay, sorry this update took so long. Family matters...
I ran your code first, with and without a form. Then JumpingJack's (nice optimization, man), with and without a form. Then mine, except using a Do...While (essentially a merger of JJ's and mine, thanks again), with and without a form. Then mine again, without a form and with all optimization flags. I did not get the same results you did.
Here are my specs:
AMD Athlon 64 X2 4400+ (stock)
ASUS A8N-VM CSM Socket 939
2GB (2 x 1GB) CORSAIR XMS DDR 400
2x 250GB Western Digital Caviar SATA 3.0Gb/s, in RAID 0
EVGA GeForce 7900GTO (stock)
Antec TRUEPOWERII 550W
Windows XP MCE
SAMSUNG 997mb 19" CRT
Dell 2407WFP Rev 3
Here are my results, in order, running each test a dozen times:
Yours in a form: ~1120
Yours, no form: ~1375
JJ's in a form: ~1050 (About what you experienced, odd.)
JJ's, no form: ~1420 (More like what I was expecting)
Mine in a form: ~1300 (Nice)
Mine, no form: ~1840 (Nicer)
Mine, optimized: ~3370 (Now that's what I'm talking about!)
Here's the code I used for the last three results:
[code:1:0f804fa13b]Option Explicit
' Start a new project, delete the form, and add a module. Throw all this in there.
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Const Pi As Double = 3.14159
Private Sub Main()
Dim I As Long
Dim K As Double, L As Double, Z As Double
Dim EndTick As Long
EndTick = GetTickCount + 1000
Do While (GetTickCount <= EndTick)
I = I + 1
K = Pi * (Pi + I)
L = (K * Pi)
Z = L / K
L = Z * (K + Pi)
Loop
MsgBox "Score: " & (I / 10000)
End Sub[/code:1:0f804fa13b]
Here's how to optimize:
When compiling the exe, select "Options..." in the dialog box. Select the "Compile" tab and click "Advanced Options...". Select all six check boxes. Click "OK" three times and you'll have an optimized VB6 app. Have fun...