Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the most speed out your program?
#4
When I write large libraries I create a copy of the library with all error checks removed.

I'm not talking about $CHECKING: but actual lines of code that checks for errors:

IF InputValue% > MaxAllowedValue% THEN Report_Error "blah blah blah"

Stuff like that. Once I have a piece of code working 100% that uses a library I then compile with a version of the library with all checks removed for speed. For instance, my sprite library consists of:

Sprite.BI
Sprite.BM
Sprite_Noerror.BM

Sprite_NoError.BM has no checks for valid syntax or values. That kind of stuff adds up and slows things down.

In fact, I'm just about finished with a complete rewrite of that old sprite library with an eye toward speed, efficiency, and easier to use. All those removed checks make a difference.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
RE: How to get the most speed out your program? - by TerryRitchie - 07-01-2024, 03:58 AM



Users browsing this thread: 6 Guest(s)