Board Logo
« CPU Benchmark »

Welcome Guest. Please Login or Register.
Nov 21st, 2009, 9:23pm



Conforums Terms of Service | Membership Rules | Home | Help | Search | Recent Posts | Notification | Format Your Message | Vista/Win7 FAQ

Please use the forums Search feature before asking. For best results select only the categories, which describe your need best.
Please post code using the code box described in Format Your Messages.
This will keep indentation, separate it better form the message and prevent gibberish.
If the code is to long for one post or additional files are needed, upload a ZIP archive to the Just BASIC Files Archive Site.
To register at the Just BASIC Files Archive Site, please follow the instructions given in File Archives - Important Registration Information.

Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: CPU Benchmark  (Read 517 times)
FoxTrot
Full Member
ImageImageImageImage

member is offline

Avatar

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

YIM YIM AIM
PM

Gender: Male
Posts: 341
xx 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
 
User IP 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

Avatar




PM

Gender: Male
Posts: 887
xx Re: CPU Benchmark
« Reply #1 on: Sep 26th, 2009, 10:23pm »

It says the lower the score the better: 99.75 is that good? grin
Nice GUI.
So you have changed your Nick. tongue
User IP Logged

cundo aka MSlayer
CaptainD
Member in Training
ImageImage

member is offline

Avatar




Homepage PM

Gender: Male
Posts: 29
xx Re: CPU Benchmark
« Reply #2 on: Sep 27th, 2009, 06:19am »

I got 13.4. cheesy

If only all benchmarking programs were this unfussy... rolleyes
User IP Logged

CaptainD's Just Basic Site
CaptainD's PC Gaming Blog
flaxen
Full Member
ImageImageImageImage

member is offline

Avatar

Crow, Awesome!


PM

Gender: Male
Posts: 187
xx Re: CPU Benchmark
« Reply #3 on: Sep 27th, 2009, 07:11am »

I got 14.203.
Quote:
99.75 is that good?

I doubt it. tongue
User IP Logged

•๖ۣۜۜFlaxen•
http://www.bioresurs.uu.se/myller/skog/skog_bild/kraka.jpg
Wanna build a radio within an hour? Check out my home built one!
http://sites.google.com/site/flaxensflax/radio-circuit
FoxTrot
Full Member
ImageImageImageImage

member is offline

Avatar

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

YIM YIM AIM
PM

Gender: Male
Posts: 341
xx 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? grin
Nice GUI.
So you have changed your Nick. tongue


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. cheesy

If only all benchmarking programs were this unfussy... rolleyes

Nice score, and yes, most of them I have used have been rather confusing.

on Sep 27th, 2009, 07:11am, flaxen wrote:
I got 14.203.

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 » User IP 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
ImageImage

member is offline

Avatar




Homepage PM

Gender: Male
Posts: 29
xx 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. huh Is there a way in JB to get different cores to perform different tasks at the same time?
User IP Logged

CaptainD's Just Basic Site
CaptainD's PC Gaming Blog
Stefan Pendl
Administrator
ImageImageImageImageImage

member is offline

Avatar

Let's talk JB ...


PM

Gender: Male
Posts: 2158
xx 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:
  1. changed main window to type dialog
    to get rid of the maximize and minimize buttons
  2. used a group box for the frame around the text
  3. used the multi-line capability of the static text control
  4. 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
  5. 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
  6. 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
 
User IP 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
ImageImageImageImage

member is offline

Avatar

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

YIM YIM AIM
PM

Gender: Male
Posts: 341
xx 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.
User IP 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
ImageImage

member is offline

Avatar




PM

Gender: Male
Posts: 57
xx Re: CPU Benchmark
« Reply #8 on: Sep 30th, 2009, 4:19pm »

9.251! - Yay!

Nice program.
User IP Logged

FoxTrot
Full Member
ImageImageImageImage

member is offline

Avatar

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

YIM YIM AIM
PM

Gender: Male
Posts: 341
xx 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)
User IP 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
ImageImageImageImageImage

member is offline

Avatar

Let's talk JB ...


PM

Gender: Male
Posts: 2158
xx 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.
User IP 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
Image

member is offline

Avatar




PM


Posts: 8
xx Re: CPU Benchmark
« Reply #11 on: Oct 23rd, 2009, 5:24pm »


coool! 15.976. haha
User IP Logged

Spawn
Member in Training
ImageImage

member is offline

Avatar

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


Homepage PM

Gender: Male
Posts: 70
xx 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.. tongue
User IP Logged

Michael J. Thomas
Stefan Pendl
Administrator
ImageImageImageImageImage

member is offline

Avatar

Let's talk JB ...


PM

Gender: Male
Posts: 2158
xx 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.. tongue


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.
User IP 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
ImageImage

member is offline

Avatar

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


Homepage PM

Gender: Male
Posts: 70
xx Re: CPU Benchmark
« Reply #14 on: Oct 25th, 2009, 5:54pm »

Oh right, thanks very much for your help Stefan.. smiley 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.. smiley

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?? undecided
« Last Edit: Oct 25th, 2009, 7:36pm by Spawn » User IP Logged

Michael J. Thomas
Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Help | Search | Recent Posts | Notification | Format Your Message | Vista/Win7 FAQ


New Monthly Ad-Free Plan!

$6.99 Gets 50,000 Ad-Free Pageviews!
| Hookah | Free Shoutboxes |

This Board Hosted For FREE By Conforums ©
Get Your Own Free Message Board!