English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 21 December 2020, 02:09   #1
peceha
Registered User
 
peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 284
[blitz] amiga/blitz Mode speed question

Hi,
Lets say my program looks like:

;---
;files with statements
INCLUDE...
INCLUDE...
INCLUDE...

;jumping into blitz mode
BLITZ

;executing some statements from INCLUDE files
some statements...
;---


The above order gives me average times for 3 parts of my program as follows:
90
250
100


When I move INCLUDE part down below BLITZ command (so the statements files are read in blitz mode) the miracle happens and the timings get much better:
8
37
11

Why does the location of inicial statements (amiga/blitz Mode) have inpact on program's speed?

Thanks

Last edited by peceha; 21 December 2020 at 02:33.
peceha is offline  
Old 21 December 2020, 03:14   #2
Nightshft
Registered User
 
Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Posts: 617
Not coding Blitz for a while, but this is what I remember.
IIRC the Blitz compiler uses the Blitz and Amiga commands "stupidly" from top to down.
For example:
Code:
BLITZ
  some code
  gosub subroutine1
AMIGA
  pgm end code
END

.subroutine1
  subcode1
return
Here "subcode1" is executed in normal Amiga mode IIRC (Correct me if I'm wrong).
I'd say it's not exactly what you'd expect from the compiler normally.
Nightshft is offline  
Old 21 December 2020, 10:36   #3
peceha
Registered User
 
peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 284
So looks like I have to be more careful where I write and what...
Thanks
peceha is offline  
Old 10 January 2021, 18:52   #4
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,345
That’s something I had never thought of; that the position of an INCLUDE statement alters the speed of the entire included file. Nice find!
idrougge is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
[blitz basic] How much amiga-blitz friendly is this? saimon69 Coders. Blitz Basic 105 21 April 2022 19:45
Interlaced display in BLITZ mode. Anakirob Coders. Blitz Basic 9 25 June 2017 23:48
Blitz: Which mode to use BippyM Coders. Blitz Basic 2 23 January 2013 18:09
BLITZ - Createdisplay in AMIGA mode Tony Landais Coders. General 7 06 May 2003 23:31
How to launch other exe in Blitz mode Tony Landais Coders. General 2 03 May 2003 23:59

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:29.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09060 seconds with 13 queries