Author Topic: why is the latest QB64 so slow?  (Read 14188 times)

0 Members and 1 Guest are viewing this topic.

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
why is the latest QB64 so slow?
« on: December 20, 2018, 07:29:20 pm »
I just downloaded both the stable and dev versions for Windows and run a simple test posted by [banned user] at the old Joyful Programmer/QB64 forum
since the forum is not available, I post his test here
the times were about 12+ seconds, I then downloaded SMcNeill's 64-bit build http://qb64.freeforums.net/thread/100/qb64-x64-10-17-2018 and the times were about 0.5 seconds
Code: QB64: [Select]
  1. '' by [banned user]
  2. CONST NumOfTests = 7
  3.  
  4. FOR ttt = 1 TO NumOfTests
  5.     PRINT "START TEST #1:";
  6.  
  7.     x = 1.234567
  8.     y = 2.345678
  9.     Time = TIMER
  10.     FOR i = 1 TO 100000000
  11.         x = x * y
  12.     NEXT
  13.     Time = TIMER - Time
  14.     PRINT "THE TEST TOOK"; Time; " seconds"
  15.  
  16. FOR ttt = 1 TO NumOfTests
  17.     PRINT "START TEST #2:";
  18.  
  19.     x = 1.234567
  20.     y = 2.345678
  21.  
  22.     Time = TIMER
  23.  
  24.     FOR i = 1 TO 100000000
  25.         x = x * y
  26.     NEXT
  27.  
  28.     Time = TIMER - Time
  29.  
  30.     PRINT "THE TEST TOOK"; Time; " seconds"
  31.  
  32. FOR ttt = 1 TO NumOfTests
  33.  
  34.     PRINT "START TEST #3:";
  35.  
  36.     x = 1.234567
  37.     y = 2.345678
  38.  
  39.     Time = TIMER
  40.  
  41.     i = 1
  42.  
  43.     WHILE i <= 100000000
  44.         x = x * y
  45.         i = i + 1
  46.     WEND
  47.  
  48.     Time = TIMER - Time
  49.  
  50.     PRINT "THE TEST TOOK"; Time; " seconds"
  51.  
« Last Edit: December 20, 2018, 08:37:45 pm by jack »

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #1 on: December 20, 2018, 10:47:29 pm »
My Copy of QB64's(32bit) test results.
« Last Edit: December 20, 2018, 10:48:31 pm by Cobalt »
Granted after becoming radioactive I only have a half-life!

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #2 on: December 21, 2018, 06:41:21 am »
I also have no problems with speed. The only option that comes to my mind is whether your tests have been run on a laptop where power management has reduced performance. My ThinkPad does this because it has a battery in a critical state of emergency (I did not have run this test on it).


Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #3 on: December 21, 2018, 06:50:31 am »
please test with the latest QB64 version for Windows, either stable or dev, as that is the version with the speed problem.
« Last Edit: December 21, 2018, 06:55:01 am by jack »

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #4 on: December 21, 2018, 07:17:52 am »
Re-tested in latest development build 2018-12-02-23-33-01. Is up to .2 sec slower


Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #5 on: December 21, 2018, 07:52:23 am »
don't understand why it's slow here
the second screenshot is from a version 2016-9-5
« Last Edit: December 21, 2018, 07:53:27 am by jack »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #6 on: December 21, 2018, 09:44:52 am »
I can confirm Jack's results:

hmm... I tried to access Help > About for my version of QB64 x32 (not latest? but still crappy time) and that version refused to put up the Help > About window to display version with the results of the test like shown in last screen shot.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #7 on: December 21, 2018, 10:15:44 am »
I get nearly identical run times, with in .05 seconds of each other, if I ran it a few hundred times they would probably be exact.
you guys have heck of a lot faster machines than mine from those screen shots. I only run windows, granted Windows VISTA.
Screen shot of slightly different times, and the build from 2018-12-2-23-33-01
« Last Edit: December 21, 2018, 10:34:08 am by Cobalt »
Granted after becoming radioactive I only have a half-life!

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #8 on: December 21, 2018, 11:15:00 am »
man you guys are fast - whats the complaint about?

im on my thinkpad w530,16gb RAM i7 2.7GHz

and this is what I got.

« Last Edit: December 21, 2018, 11:17:43 am by xra7en »
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #9 on: December 21, 2018, 11:44:18 am »
man you guys are fast - whats the complaint about?

im on my thinkpad w530,16gb RAM i7 2.7GHz

and this is what I got.
the complaint is that this not normal, something is very wrong
« Last Edit: December 21, 2018, 11:46:30 am by jack »

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #10 on: December 21, 2018, 11:53:32 am »
man you guys are fast - whats the complaint about?

im on my thinkpad w530,16gb RAM i7 2.7GHz

and this is what I got.
the complaint is that this not normal, something is very wrong

Interesting.. I am a little confused then, if most here are getting a .xxx  which is processing pretty fast, and then others are getting 10+.xx which is slow, are the results supposed to be a little more closer together?
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #11 on: December 21, 2018, 12:17:24 pm »
if you are getting 10+.xx then it probably should be less than 0.5 seconds
please try SMcNeill's 64-bit build http://qb64.freeforums.net/thread/100/qb64-x64-10-17-2018
« Last Edit: December 21, 2018, 12:20:10 pm by jack »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #12 on: December 21, 2018, 12:33:37 pm »
Yes xra7en, you are getting 10 secs with thinkpad where I am getting 12 secs with laptop (with newer defective? QB64 version).

I agree with Jack, try SMcNeill's 64-bit QB64 (if thinkpad does 64 bit) and watch times drop below .5 secs.
« Last Edit: December 21, 2018, 12:36:59 pm by bplus »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: why is the latest QB64 so slow?
« Reply #13 on: December 21, 2018, 01:31:58 pm »
QB64x64 has always been marginally faster for me, but not by the difference specified.  I don’t have a clue as to what might’ve changed to reduce execution speeds so greatly, but I’ll do some testing later and you you guys know what results I’m getting as well.  ;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: why is the latest QB64 so slow?
« Reply #14 on: December 21, 2018, 01:33:14 pm »
BIG DIFF for me..

Rev 20180228/86

EDIT: ADDED SPECS
Core i7 3720QM - 16 GB RAM - 2TB HDD @2.70GHz (thinkpad w530 laptop)
« Last Edit: December 21, 2018, 01:38:33 pm by xra7en »
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!