Author |
Topic: CPU Benchmark (Read 517 times) |
|
FoxTrot
Full Member
   
member is offline

If normal is being the same as everything else, but being yourself is normal, are you everything else?


Gender: 
Posts: 341
|
 |
CPU Benchmark
« Thread started on: Sep 26th, 2009, 9:39pm » |
|
I am not the original maker of this code, I just edited it. It was in the main window, and I wanted it to have a small little GUI. I Think it turned out well. (My score is ~20)
Code: nomainwin
[main]
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
WindowWidth = 150
WindowHeight = 227
statictext #main.statictext1, " -/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-", 0, 0, 280, 20
statictext #main.statictext2, "| Jensmarks |", 0, 20, 280, 20
statictext #main.statictext3, "| Press test to begin |", 0, 40, 456, 20
statictext #main.statictext4, "| Press exit to close |", 0, 60, 256, 20
statictext #main.statictext5, "| |", 0, 80, 280, 20
statictext #main.statictext6, "| By: Jens Vossnack |", 0, 100, 152, 20
statictext #main.statictext7, "| Edited By: FoxTrot |", 0, 120, 160, 20
statictext #main.statictext8, " -/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-", 0, 140, 280, 20
radiobutton #main.radiobutton9, "Debug Mode", [debugmodeon], [debugmodeoff], 22, 155, 96, 20
button #main.button10, "Test", [test], UL, 0, 175, 72, 20
button #main.button11, "Exit", [exit], UL, 71, 175, 73, 20
open "CPU Test" for window_nf as #main
print #main, "trapclose [wait]"
print #main, "font ms_sans_serif 0 16"
if debug = 1 then
print #main.radiobutton9, "set"
else
print #main.radiobutton9, "reset"
end if
wait
[wait]
wait
[debugmodeon]
if debug = 1 then goto [debugmodeoff]
debug = 1
print #main.radiobutton9, "set"
wait
[debugmodeoff]
debug = 0
print #main.radiobutton9, "reset"
wait
[test]
close #main
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
WindowWidth = 352
WindowHeight = 263
texteditor #test.textedit1, 0, 0, 344, 235
open "CPU Test" for dialog_nf as #test
print #test, "trapclose [quit.test]"
print #test, "font ms_sans_serif 0 16"
print #test.textedit1, "Beginning CPU test..."
if debug = 1 then
print #test.textedit1, "(DEBUG)"; 12^4500
else
print 12^4500
end if
print #test.textedit1, "Now calculating. There is no way to exit... Please wait."
time1 = time$("ms")
A = 6789^6789
time2 = time$("ms")
if debug = 1 then
print #test.textedit1, "(DEBUG)"; time1
print #test.textedit1, "(DEBUG)"; A
print #test.textedit1, "(DEBUG)"; time2
end if
print #test.textedit1, "Your score is:"
print #test.textedit1, (time2-time1)/1000
print #test.textedit1, "The lower the score, the better."
wait
[quit.test]
close #test
goto [main]
[exit]
close #main
end
|
|
Logged
|
Future Military Police for the U.S. Army, and the son of a current M.P.!
God bless our troops, the citizens of our world, and the people who defend them one and all!
|
|
|
cundo
ThreadRestoreGroup
  
member is offline


Gender: 
Posts: 887
|
 |
Re: CPU Benchmark
« Reply #1 on: Sep 26th, 2009, 10:23pm » |
|
It says the lower the score the better: 99.75 is that good?  Nice GUI. So you have changed your Nick.
|
|
Logged
|
cundo aka MSlayer
|
|
|
FoxTrot
Full Member
   
member is offline

If normal is being the same as everything else, but being yourself is normal, are you everything else?


Gender: 
Posts: 341
|
 |
Re: CPU Benchmark
« Reply #4 on: Sep 27th, 2009, 10:39am » |
|
on Sep 26th, 2009, 10:23pm, cundo wrote:It says the lower the score the better: 99.75 is that good?  Nice GUI. So you have changed your Nick. |
|
Hahaha!!! Are you using something along the lines of a pentium III or lower? I haven't tested my pentium 4 (I'll get back to you on that) but my Centrino Dou gets a 20.
And yes, TheSurvivor was getting a tad old, and this was a nick that I earned in JROTC. I like it ^_^
on Sep 27th, 2009, 06:19am, CaptainD wrote:I got 13.4. 
If only all benchmarking programs were this unfussy... |
|
Nice score, and yes, most of them I have used have been rather confusing.
on Sep 27th, 2009, 07:11am, flaxen wrote: With the scores you guys are getting, you must have way newer systems than I (Core 2 Duos maybe?)... Makes me wonder what a Core i7 would score... After all... 8 processors and all opposed to my 2... That would increase a lot.
|
| « Last Edit: Sep 27th, 2009, 10:44am by FoxTrot » |
Logged
|
Future Military Police for the U.S. Army, and the son of a current M.P.!
God bless our troops, the citizens of our world, and the people who defend them one and all!
|
|
|
CaptainD
Member in Training
 
member is offline


Gender: 
Posts: 29
|
 |
Re: CPU Benchmark
« Reply #5 on: Sep 27th, 2009, 12:59pm » |
|
on Sep 27th, 2009, 10:39am, FoxTrot wrote:| With the scores you guys are getting, you must have way newer systems than I (Core 2 Duos maybe?)... Makes me wonder what a Core i7 would score... After all... 8 processors and all opposed to my 2... That would increase a lot. |
|
Mine's a Core 2 Quad Q8200 with each core running at 2.33GHz - it did make me wonder exactly how Just Basic handles multiple core CPUs, as I'm guessing JB was created long before duo or quad core machines were common. Is there a way in JB to get different cores to perform different tasks at the same time?
|
|
Logged
|
CaptainD's Just Basic Site CaptainD's PC Gaming Blog
|
|
|
Stefan Pendl
Administrator
    
member is offline

Let's talk JB ...

Gender: 
Posts: 2158
|
 |
Re: CPU Benchmark
« Reply #6 on: Sep 27th, 2009, 1:30pm » |
|
on Sep 27th, 2009, 12:59pm, CaptainD wrote:| Is there a way in JB to get different cores to perform different tasks at the same time? |
|
JB and LB do not support developing multi-threaded applications.
Below find a different GUI layout:
changed main window to type dialog to get rid of the maximize and minimize buttons used a group box for the frame around the text used the multi-line capability of the static text control used a check box instead of the radio button radio buttons are better suited for selecting between multiple exclusive options, for a yes/no check a check box is better suited changed the text progress window to type dialog_modal to avoid the need to close the main window, the UpperLeft_ values are based on the main windows client area you need to set WindowWidth and WindowHeight before you calculate UpperLeft_ values or the initial default size or the size of the last window is used Code:
nomainwin
[main]
WindowWidth = 150
WindowHeight = 227
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
Message$ = " Jensmarks" + chr$(13) + chr$(13) + _
" Press test to begin" + chr$(13) + _
" Press exit to close" + chr$(13) + chr$(13) + _
" By: Jens Vossnack" + chr$(13) + _
" Edited By: FoxTrot"
groupbox #main.gb, "", 7, 0, 130, 150
statictext #main.statictext1, Message$, 10, 20, 120, 120
checkbox #main.checkbox9, "Debug Mode", [nothing], [nothing], 22, 155, 96, 20
button #main.button10, "Test", [test], UL, 0, 175, 72, 20
button #main.button11, "Exit", [exit], UL, 71, 175, 73, 20
open "CPU Test" for dialog as #main
print #main, "trapclose [nothing]"
print #main, "font ms_sans_serif 0 16"
[nothing]
wait
[test]
#main.checkbox9 "value? isSet$"
if isSet$ = "set" then
debug = 1
else
debug = 0
end if
WindowWidth = 352
WindowHeight = 263
UpperLeftX=1
UpperLeftY=1
texteditor #test.textedit1, 0, 0, 344, 235
open "Executing CPU Test ..." for dialog_modal as #test
print #test, "trapclose [quit.test]"
print #test, "font ms_sans_serif 0 16"
print #test.textedit1, "Beginning CPU test..."
if debug = 1 then
print #test.textedit1, "(DEBUG)"; 12^4500
else
print 12^4500
end if
print #test.textedit1, "Now calculating. There is no way to exit... Please wait."
time1 = time$("ms")
A = 6789^6789
time2 = time$("ms")
if debug = 1 then
print #test.textedit1, "(DEBUG)"; time1
print #test.textedit1, "(DEBUG)"; A
print #test.textedit1, "(DEBUG)"; time2
end if
print #test.textedit1, "Your score is:"
print #test.textedit1, (time2-time1)/1000
print #test.textedit1, "The lower the score, the better."
wait
[quit.test]
close #test
wait
[exit]
close #main
end
|
|
Logged
|
Stefan
Any code I post can be used by others in their own projects, there is no need to ask for permission, just give credit if you like
Just BASIC 1.01, Windows Vista Home Premium SP2, AMD Turion X2 RM-70 2GHz, 4GB RAM
|
|
|
FoxTrot
Full Member
   
member is offline

If normal is being the same as everything else, but being yourself is normal, are you everything else?


Gender: 
Posts: 341
|
 |
Re: CPU Benchmark
« Reply #7 on: Sep 28th, 2009, 07:24am » |
|
Nice one Stefan! A lot better than mine. I think the GUI looks nice. I just noticed something... In debug mode on my computer, it takes an extra 10+ seconds just to put A (The variable) on the screen. I guess it would be kind of long, being 6789 to the power of 6789.Oh well, it gets the times before it prints, so it doesn't interfere with benchmarking results.
|
|
Logged
|
Future Military Police for the U.S. Army, and the son of a current M.P.!
God bless our troops, the citizens of our world, and the people who defend them one and all!
|
|
|
JSO
Member in Training
 
member is offline


Gender: 
Posts: 57
|
 |
Re: CPU Benchmark
« Reply #8 on: Sep 30th, 2009, 4:19pm » |
|
9.251! - Yay!
Nice program.
|
|
Logged
|
|
|
|
FoxTrot
Full Member
   
member is offline

If normal is being the same as everything else, but being yourself is normal, are you everything else?


Gender: 
Posts: 341
|
 |
Re: CPU Benchmark
« Reply #9 on: Oct 4th, 2009, 6:40pm » |
|
I got a decent surprise today, and figured I'd share with you guys (and gals).
I just got my pentium 4 desktop fixed. I ran this under Windows 7. To my surprise, it had about the same score as my centrino Duo! It came out at 25, as my centrinos was 20. Maybe it's to do with XP versus 7? Your call, because I don't know. It's only 5 seconds longer, but for the time lapse between the processors, I expected a bigger gap.
Then my SECOND surprise of the day. I booted into ubuntu and ran this program under WINE. I expected to get a HORRIBLE score (50 maybe if I was lucky). What I got came like a punch to the face.
WINE on a pentium 4 MATCHED that of windows XP on a centrino duo. I thought WINE would go slower, but it was actually faster.
WINE: 1.1.30 Ubuntu: 9.04 Windows 7: Version 7600 Pentium 4 clock: 2.6 GHz (Single core) Centrino Duo clock: 1.7(5?) GHz (Dual Core)
|
|
Logged
|
Future Military Police for the U.S. Army, and the son of a current M.P.!
God bless our troops, the citizens of our world, and the people who defend them one and all!
|
|
|
Stefan Pendl
Administrator
    
member is offline

Let's talk JB ...

Gender: 
Posts: 2158
|
 |
Re: CPU Benchmark
« Reply #10 on: Oct 5th, 2009, 03:58am » |
|
on Oct 4th, 2009, 6:40pm, FoxTrot wrote:WINE on a pentium 4 MATCHED that of windows XP on a centrino duo. I thought WINE would go slower, but it was actually faster. |
|
Windows 7 is better optimized for speed, than Vista or XP, it is definitely the fastest current Windows release.
UNIX has a long history of code optimization, so it is no surprise, that Linux on an slower hardware is faster, than Windows on a faster hardware.
In the past the big companies, which distributed UNIX based systems, had always less CPU power for faster calculations, since the operating system was better optimized.
|
|
Logged
|
Stefan
Any code I post can be used by others in their own projects, there is no need to ask for permission, just give credit if you like
Just BASIC 1.01, Windows Vista Home Premium SP2, AMD Turion X2 RM-70 2GHz, 4GB RAM
|
|
|
CanonRebel
New Member

member is offline


Posts: 8
|
 |
Re: CPU Benchmark
« Reply #11 on: Oct 23rd, 2009, 5:24pm » |
|
coool! 15.976. haha
|
|
Logged
|
|
|
|
Spawn
Member in Training
 
member is offline

*** SPAWN - THE BATTLE BETWEEN HEAVEN & HELL HAS ONLY JUST BEGUN!!! :D ***

Gender: 
Posts: 70
|
 |
Re: CPU Benchmark
« Reply #12 on: Oct 24th, 2009, 03:09am » |
|
Does anybody know what a really bad score would be cause I would like to incorporate this program into the start of a complex Just BASIC application I've written to check whether the computer it's installed on is capable of running my software..
Just to note that when I mean a really bad score, I mean one like Just BASIC would barely perform properly or Microsoft Windows would have trouble running Paint hehe..
|
|
Logged
|
Michael J. Thomas
|
|
|
Stefan Pendl
Administrator
    
member is offline

Let's talk JB ...

Gender: 
Posts: 2158
|
 |
Re: CPU Benchmark
« Reply #13 on: Oct 24th, 2009, 04:41am » |
|
on Oct 24th, 2009, 03:09am, Spawn wrote:Just to note that when I mean a really bad score, I mean one like Just BASIC would barely perform properly or Microsoft Windows would have trouble running Paint hehe.. |
|
This all depends on the combination of O/S and H/W.
JB runs fine on very old H/W with Win9x installed.
Since this is a calculation speed test where the time is divided by 1000, I would assume as the result gets nearer to 1000 the problems will raise.
|
|
Logged
|
Stefan
Any code I post can be used by others in their own projects, there is no need to ask for permission, just give credit if you like
Just BASIC 1.01, Windows Vista Home Premium SP2, AMD Turion X2 RM-70 2GHz, 4GB RAM
|
|
|
Spawn
Member in Training
 
member is offline

*** SPAWN - THE BATTLE BETWEEN HEAVEN & HELL HAS ONLY JUST BEGUN!!! :D ***

Gender: 
Posts: 70
|
 |
Re: CPU Benchmark
« Reply #14 on: Oct 25th, 2009, 5:54pm » |
|
Oh right, thanks very much for your help Stefan.. I think I will test this program on one of my relatives computers which is not very good and go off the score that I receive so that I can come to an average number of what would be at least a reliable computer for my program to run on.. 
Oh & one last thing.. Do you think that I should make the program automatically cancel out and not let the user run it if their computer isn't good enough or give the user a choice of whether they want to carry on regardless of the slight risk that it might crash and not function adequately??
|
| « Last Edit: Oct 25th, 2009, 7:36pm by Spawn » |
Logged
|
Michael J. Thomas
|
|
|
|