Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB 4.0 - The fastest?
#11
King Cheetah: to stop the wierd smileys, when you post you can check the box "Disable BBCode in this post" Tongue
Reply
#12
Thanks Smile

PureBasic - I will do it soon (As soon as I get on the Net again).
ingCheetah, the Running Cheetah Software programmer

http://rcs.fateback.com/
Reply
#13
qb 4.5, pds 6+ and vbdos have a bug in the floating-point runtime lib, that makes them lose to any other dos compiler when a benchmark using fp calcs is done..

i found that bug in 1998 and wrote a fix for that, it can be downloaded at qb45.com misc file section, it's called FFIX ( ddl f/ lazy c0derz like me: http://qb45.tonez-online.com/qbasic/pn/m...e=ffix.zip ) you can see more details about that stupid bug, reading the source code.

now about the Turbo C result, the compiler is smart enough to simply skip the whole inner loop, as nothin' is being done. you must at least put some kind of calculation inside that loop or else.. i guess turbo pascal is doing the same..

and xbasic.. if you are going to code on a C language with BASIC keywords, well.. i prefer coding in C directly..
Reply
#14
Hey v1ctor!!!! Nice to see you here. ;*) Can you spank Blitz for me?
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#15
Quote:Can you spank Blitz for me?
Get in line... :wink:
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#16
Hi!

I checked PureBasic with this:

DefType.w i , j
OpenConsole()
a$=Input()
For i=0 To 10000
For j=0 To 10000
Next j
Next i
CloseConsole()

Because of the demo runs only in debugging mode, I didn't wrote the things on the screen. I watched the variables from the debug window.

The result: 14 seconds

Note: I think this is 5 to 10 seconds in normal (not debugging) mode (But the demo didn't let it to try)


Now, I checked an other thing: How efficiently used they the CPU.
My computer is a 233Mhz Pentium with 133Mhz SD RAM. So it can do 233000000/133000000 instructions per second. One instruction is one ASM code, of course.
CPU registers under normal DOS mode are 16Bits: so adding one to an integer can result one ASM command if the language is good.
Under Win32, they can be 32Bits. So one Assemby code can add one to a LONG.

That code above can be translated into 10000*10000=100000000 ASM codes. Of course, don't left out the JUMPs, these also eat up one ASM code. So it is 200000000 commands now.
And one thing still missing: The CPU can't store the instructions, it must load them from the memory as they comes. So this is 100000000 additional cycles, on the speed of the memory.

So the virtual best run can be: 200M / 233Mhz + 100M / 133Mhz = 1.61 seconds

Here are the results in CPU%:

1. TurboC: 80,5% (100%)
2. FirstBasic: 32,2% (33%)
3. XBasic: 20,1% (25%)
3. PureBasic(?): (25%)
5. QBasic 4.5: 10,7%
6. QBasic 4.0: 8,1%
7. RapidQ: 0,25%


Note: Windows programming languages can't be as fast as DOS ones, because they need to check many things, and need to be OK with multitasking.
XBasic generates assemby code to compile to EXE with an ASM program (This is platform - dependent: Under Linux, a Linux ASM program must be used, and under Win, a Windows based one).
ingCheetah, the Running Cheetah Software programmer

http://rcs.fateback.com/
Reply
#17
That only applies for DOS 32-bit programs, though. Windows 32-bit programs will always be faster than real mode DOS programs no matter what (well, unless it comes from a crappy compiler).


Firstbasic is the freeware version of powerbasic. Are you using the dos version or Windows?
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#18
i can't find 4.0. where can i find it for download? or do i have to buy it?
Jumping Jahoolipers!
Reply
#19
here's the only link i could find:
http://billy_qbasic.tripod.com/download/qb40.zip

But 4.0 isnt any faster. Whatever speed advantage there is is resolved by ffix or dav's solution, in which case actually 4.5 is a wee faster. (Plus, the classic "blue" ide isnt there Tongue)

NOTE: Don't ever pay for a version of QBasic. Unlike VB or VC++, Qbasic/QB/PDS/VBDos is one of the most legitimate cases of abandonware there is. It went off the market years ago, and Microsoft offers absolutely no support for it, excluding a few archaic documents in their help database.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#20
the link doesn't work... how do you get ffix to work?
Jumping Jahoolipers!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)