Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB 4.0 - The fastest?
#21
the link works fine. you have to drag it into the address bar.

as for ffix, i wouldnt know... i've only used the one at the code post. But you should just link the qlb to the one you're using and call a single sub, right?
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
#22
FirstBasic: I have got a DOS version.

Turbo C: It didn't skip the loop. I checked out Jump Optimization, and the program during executing too.
ingCheetah, the Running Cheetah Software programmer

http://rcs.fateback.com/
Reply
#23
barok: To make ffix work
1.-download it http://usuarios.lycos.es/antonigual/tools/ffix.zip
2.-Unzip it and copy ffix.lib and ffix.qlb to your library directory (where qb.lib and qb.qlb are)
3.-Invoke qb with /l LibraryPath\ffix
4.-add after the last DECLARE of your program
Code:
DECLARE SUB FFIX
FFIX

and that's all.
Ffix speeds up only floating point calcs
Antoni
Reply
#24
I never used it, but it is included in the ffix.zip I got from Antoni.

ffix is great or single variables calculations, but doesn't seem to work with double variables (I use them a lot with fractals).
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
Reply
#25
FFIX is great!!!

Look in Kicsi Kocsi (Little Car) 1.30 SE Smile

(I programmed KK 1.30 three years ago... And now, I improved it with FFIX Smile, and some other things)
ingCheetah, the Running Cheetah Software programmer

http://rcs.fateback.com/
Reply
#26
Whoa! I found a QB speed topic & the Running Cheetah Software programmer at the same time Smile

Sorry, i did not have time to read this, but i made some QB speed tests what i wanted to post somewhere.

As i can see this topic is really out of date, but KingCheetah: what happened to your big cat game, Panthera?


So here are those speed - tests (I had written them some days ago):


How slow is Quick Basic?

I just tested some codes on my P233 (a few days ago near midnight) with this code:

Code:
'Speed - test

intc% = 15
floc% = 2

'Some floating point:

DEF SEG = &H40
tim1& = PEEK(&H6D)
tim1& = tim1& * 256 + PEEK(&H6C)

FOR j% = 0 TO floc% - 1
FOR i% = 0 TO 32000
  b# = 1
  a# = 5
  d# = 99
  c# = a# / b#
  d# = d# + c#
  e# = 3 * d#
  c# = e# - d#
NEXT i%
NEXT j%

tim2& = PEEK(&H6D)
tim2& = tim2& * 256 + PEEK(&H6C)
PRINT "Floattest start/end:", tim1&, tim2&
IF tim2& - tim1& < 0 THEN PRINT tim2& - tim1& + 65536 ELSE PRINT (tim2& - tim1&) / floc%


'And integers:

DEF SEG = &H40
tim1& = PEEK(&H6D)
tim1& = tim1& * 256 + PEEK(&H6C)

FOR j% = 0 TO intc% - 1
FOR i% = 0 TO 32000
  b% = 1
  a% = 5
  d% = 99
  c% = a% \ b%
  d% = d% + c%
  e% = 3 * d%
  c% = e% - d%
NEXT i%
NEXT j%

tim2& = PEEK(&H6D)
tim2& = tim2& * 256 + PEEK(&H6C)
PRINT "Integertest start/end:", tim1&, tim2&
IF tim2& - tim1& < 0 THEN PRINT tim2& - tim1& + 65536 ELSE PRINT (tim2& - tim1&) / intc%

Where i experienced times less than 50 ticks i increased intc% or floc% to get more accurate results.
(These values are in clock ticks showing how long it takes to run that i%=0 to 32000 loop on my P233)


I got these results:

Code:
Integer      Float       Size

QBasic 1.0 --------------------------------------
  from IDE       3.5          44.8
QBasic 4.0 --------------------------------------
  from IDE       1.14          1.8
  compiled       0.152         0.27       24533
QBasic 4.5 --------------------------------------
  from IDE       1.14         10.9
  compiled       0.152         8.6        24430
  IDE + FFIX     1.14          1.45
  comp + FFIX    0.152         0.25       24580
QBasic 7.1 --------------------------------------
  from IDE       1.14         11
  compiled       0.157         5.2        28674
  (I could not make FFIX working with it)
FirstBasic --------------------------------------
  from IDE       0.217         0.525
  compiled       0.217         0.525      21616

From this QBasic 4.5 seems to be the best choice. I know that 7.1 can create huge EXEs and has some other advantages, but i still more like 4.5.
In the past i had some other basic compilers too, but i think i deleted them during a disk cleaning.
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply
#27
-_- Man, I really hate think this is some new topic and finding posts by me from a year and half ago.

1 hour to midnight! UF is getting whipped! Woooo!
Reply
#28
Why fill the servers with trash if the subject we want to talk about exists somewhere?? I can not understand this. I know that sometimes those silly old posts are annoying, but some other times they are interesting. So i will continue being a "topic necromancer" no matter who say what. Why create a new topic just because the last talking about the same dead a few months ago?

Back to the subject: it is interesting that almost all versions of QB does the integer calculations at the same speed. Guess that the code was not changed in this term.
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply
#29
(I never delete or modify my posts if once i pressed "Submit")

Sorry about that, it makes me the most upset when somebody tries to limit my freedom. Usually i not make this happen as i know how far i can go, but i never thought that reviving such a topic can hurt anyone. It may be my fault as i just assumed that this is full of some silly speed tests without really reading it.
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply
#30
I think QB do integer math at the same speed simply, cause theres only so many ways you can do it. Thers nothing to optimize (Except removing error correction/checking, which would go against MS idea of QB)

If error checking was added to FB it would prolly end up just about the same speed as QB (I we dissregard the fact that it's 32bit and not 16bit that is Tongue )
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)