Table 4
Mean matrix element access time, indirect access
5.742.15145
5.736.35105
5.838.71070
6.231.31040
5.835.22525
5.824.9525
6.627.21515
5.336.47010
5.530.44010
5.636.91455
5.632.61055
5.023.8255
Indirect access
overhead (mS)
Mean acces time,
single element (mS)
Matrix
Columns
Matrix
Row
[7.44] Local subroutines execute faster than global subroutines
TI Basic subroutines can be defined outside of the calling routine (an global subprogram), or they can
be defined within the calling routine (a local subprogram). As an example, this program t() calls the
external function sub1():
t()
Prgm
Local k,r
For k,1,500
sub1(k)→r
EndFor
EndPrgm
sub1(x)
Func
Return x^2
EndFunc
sub1() would be defined locally in t() like this:
t()
Prgm
Local k,r,sub1
Define sub1(x)=Func
Return x^2
EndFunc
For k,1,500
sub1(k)→r
EndFor
EndPrgm
Local subroutine calls are slightly faster, as this table shows.
LocalGlobal
7 - 52