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: 45
Posts: 263
[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 online now  
Old 21 December 2020, 03:14   #2
Nightshft
Registered User

Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Posts: 492
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: 45
Posts: 263
So looks like I have to be more careful where I write and what...
Thanks
peceha is online now  
Old 10 January 2021, 18:52   #4
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,020
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 offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interlaced display in BLITZ mode. Anakirob Coders. Blitz Basic 9 25 June 2017 23:48
[blitz basic] How much amiga-blitz friendly is this? saimon69 Coders. Blitz Basic 104 29 November 2016 20:45
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 08:38.


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