Wow latch according to my speed test your's is the fastest!
sync on
sync rate 0
REM Setup
tt= 1000
REM g(0) is to turn the text command on and off. 1 = off.
dim g(0)
g(0) = 0
wait 1000
print "Press key to continue"
wait key
cls
REM NumLine
t# = timer()
for lp = 1 to tt
NumLine(450,450,0,450,45)
NumLine(450,450,0,450,45)
NumLine(450,450,0,450,45)
NumLine(450,450,0,450,45)
next lp
text 100,100, str$(timer()-t#)+" test 1 NumLine"
REM AlteredNumLine
ink rgb(255,0,0),0
t# = timer()
for lp = 1 to tt
AlteredNumLine(450,450,0,450,10,0)
AlteredNumLine(450,450,0,450,10,0)
AlteredNumLine(450,450,0,450,10,0)
AlteredNumLine(450,450,0,450,10,0)
next lp
text 100,200, str$(timer()-t#)+" test 2 AlteredNumLine"
REM Numbered_Reect
xsize=620
ysize=459
totrect=40
ink rgb(0,255,0),0
t# = timer()
for lp = 1 to tt
numbered_reect(xsize,ysize,totrect)
next lp
text 100,300, str$(timer()-t#)+" test 3 numbered_reect"
REM Sync and Ends
sync
Wait key
END
REM Functions
function numbered_reect(xsize,ysize,totrect)
stepnum=totrect/4
xinc=xsize/stepnum
yinc=ysize/stepnum
separation=stepnum*2
a=-1
b=stepnum
for x=0 to xsize step xinc
inc a
if g(0) = 0
text x,0,str$(separation+a)
text xsize-x,ysize,str$(a)
endif
if x > 0 and (a < stepnum)
inc b
inc y,yinc
if g(0) = 0
text 0,ysize-y,str$(b)
text xsize,y,str$(separation+b)
endif
endif
next x
endfunction
Function NumLine(x1,y1,x2,y2,space)
diffX = x1-x2
diffY = y1-y2
b = atanfull(diffX,diffY)
distance = sqrt(diffX*diffX + diffY*diffY)
for lp = 1 to distance step space
x = x1-sin(b)*lp
y = y1-cos(b)*lp
if g(0) = 0 then text x,y,str$(a)
a = a + 1
next lp
EndFunction
FUNCTION AlteredNumLine(x1,y1,x2,y2,numSteps,a)
incX# = (x2-x1)/numSteps
incY# = (y2-y1)/numSteps
FOR i = 1 TO numSteps
if g(0) = 0 then text x1,y1,str$(a)
x1 = x1+incX#
y1 = y1+incY#
a = a + 1
NEXT i
ENDFUNCTION
Ohh yeah what I tested befor was only the calulation speed without the text command.