Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the most speed out your program?
#11
Dang it! why does that Option clear all my recent files in the File Menu ???

Warning!!!
b = b + ...
Reply
#12
(07-02-2024, 07:34 PM)bplus Wrote:
(07-02-2024, 06:45 PM)Pete Wrote:
(07-02-2024, 06:38 PM)a740g Wrote: Compile the final executable with optimizations enabled. That alone should give a 2x - 4x (probably more) performance uplift.
Custom compilation was a method in QuickBASIC, too. For instance if you didn't send anything to the printer, omit the printer subroutine. I still remember the most common optimization switches I used: OSEX. Gee, I wonder how that one got committed to memory? 

Anyway, could you share an example or Wiki link as to how to accomplish this in QB64?

Pete

IDE Menu Options > Compiler Settings


Looks like you need to know some C++


brought to you by know-tube
I wrote a keyboard input routine in C/C++ once many years ago. It was like pulling teeth to get any help on C/C++ forums, as almost every "expert" stated to just use a pre-built key input lib. I finally got just the couple of questions I needed answered, and successfully completed the project. Obviously despite that success, I didn't bother to continue learning about the language. Now, it too seems to be going the way of the dinosaur.

Thanks for the IDE compiler optimization info. I was thinking it might take adding switches while doing a manual compilation. +1 for that, but I'm sorry it cost you losing your recent file list. That should be reported as a probably bug. My recent files are invaluable... Of course the list is just a single line of text that spells out, "Same crap you code all the time, Pete."

Pete
Reply
#13
With Quick Basic, and especially with QuickC programs, it actually made sense to compile them from the command line.
It didn't always work, but with some programs the EXE file was 1/3 smaller. That made sense back then, but not anymore.

To compile from the command line you had to enter the appropriate commands/switches in the autoexec.bat.

For example:
Code: (Select All)

rem // Muss in '... .BAT' und '... .DOS' stehen //
rem *** Fuer QuickC, QuickBasic und MASM ***
SET LIB=F:\QC25\LIB;F:\QB4
SET INCLUDE=F:\QC25\INCLUDE
SET LINK=F:\QC25\BIN\QLINK /CO /NOI /LI
rem INC /PADC /PADD
SET CL=/FPi87 /AM /G2 /Bd /Zi /Zd /Ox
rem /Bd
SET MASM=/C /V /Z /ZI

SET TMP=C:\TEMP
SET TEMP=C:\TEMP

CLS
mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi)
mode con codepage select=850
keyb gr,,C:\WINDOWS\COMMAND\keyboard.sys
Reply
#14
(07-02-2024, 06:45 PM)Pete Wrote:
(07-02-2024, 06:38 PM)a740g Wrote: Compile the final executable with optimizations enabled. That alone should give a 2x - 4x (probably more) performance uplift.
Custom compilation was a method in QuickBASIC, too. For instance if you didn't send anything to the printer, omit the printer subroutine. I still remember the most common optimization switches I used: OSEX. Gee, I wonder how that one got committed to memory? 

Anyway, could you share an example or Wiki link as to how to accomplish this in QB64?

Pete
There's a section in the "Using the IDE" side lesson in the tutorial called "Options Menu: Compiler Settings" that explains the compiler settings:

https://www.qb64tutorial.com/lessonide
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#15
(07-02-2024, 07:34 PM)bplus Wrote:
(07-02-2024, 06:45 PM)Pete Wrote:
(07-02-2024, 06:38 PM)a740g Wrote: Compile the final executable with optimizations enabled. That alone should give a 2x - 4x (probably more) performance uplift.
Custom compilation was a method in QuickBASIC, too. For instance if you didn't send anything to the printer, omit the printer subroutine. I still remember the most common optimization switches I used: OSEX. Gee, I wonder how that one got committed to memory? 

Anyway, could you share an example or Wiki link as to how to accomplish this in QB64?

Pete

IDE Menu Options > Compiler Settings


Looks like you need to know some C++


brought to you by know-tube

The only real thing you need to know is how to click that first check box and then compile.  Tongue
Reply
#16
yeah and do that before you start running up recent files ;-))

Update: yep, just lost the couple of Recent files I had accumulated when I checked that box and unchecked the 2nd.

AGAIN WARNING!!!
b = b + ...
Reply
#17
" The only real thing you need to know is how to click that first check box and then compile.  [Image: tongue.png] "

Okay, so how do I check the box??? Big Grin

BTW - I don't have a mouse, but I do have a hamster named Dave.

Pete
Reply
#18
(07-02-2024, 11:40 PM)Pete Wrote: " The only real thing you need to know is how to click that first check box and then compile.  [Image: tongue.png] "

Okay, so how do I check the box??? Big Grin

BTW - I don't have a mouse, but I do have a hamster named Dave.

Pete

Tab-Tab-ENTER
Tab-Tab-Tab-Tab-Tab-ENTER
Reply
#19
Quote:BTW - I don't have a mouse, but I do have a hamster named Dave.

   
b = b + ...
Reply
#20
LOL - My hamster wheel keeps on turning!!!

Also, I love it how Steve always takes my bits literally... TAB... TAB... TAB... Luckily since Dave's not here, I have Kate to fall back on. She's a Tabby cat!

Pete Big Grin
Reply




Users browsing this thread: 3 Guest(s)