Something is still not right. SB is doing 30,000 iterations like O2 but your results seem more dense. I modified your version to display execution time.
BTW: Why does O2 have such a problem with t2-t1/1000 or (t2-t1)/1000 ? I had to get very basic with the expression to return the desired results.
Peter's O2 SDL fern example
include "sdl.inc"
SetDisplay 640,500, 1
SetCaption "SDL FERN DEMO"
single a, b, c, d, e, f, newx, newy, sys r, wa, t1, t2, t3
Dim xy(2) as single
Sub Fern
r = Rand(0,100)
iF r <= 10
a = 0
b = 0
c = 0
d = 0.16
e = 0
f = 0
ElseiF r > 1 and r <=86
a = 0.85
b = 0.04
c = -.04
d = 0.85
e = 0
f = 1.60
ElseiF r > 86 and r <=93
a = 0.2
b = -.26
c = 0.23
d = 0.22
e = 0
f = 0.16
Else
a = -.15
b = 0.28
c = 0.26
d = 0.24
e = 0
f = 0.44
End iF
newx = ((a * xy(1)) + (b * xy(2)) + e)
newy = ((c * xy(1)) + (d * xy(2)) + f)
xy(1) = newx
xy(2) = newy
SetPixel xy(1)*40+275,xy(2)*40+50, 0,210,55
End Sub
t1 = SDL_GetTicks
ClsColor 28,28,28
wa=0
do
for i=1 to 10
wa++
if wa=30000 or key(27) then exit do
Fern
next
SetCaption "Fern Points: " + str(wa)
Flip
end do
t2 = SDL_GetTicks
t3 = t2 - t1
PRINT t3 / 1000
WaitKey(27)
Ends
Script BASIC GFX fern example
' ScriptBasic GFX - Fern
IMPORT gfx.inc
s = gfx::Window(640,500,"ScriptBasic GFX Fern")
RANDOMIZE(gfx::Time())
SPLITA STRING(3,"0") BY "" TO xy
SUB Fern
r = RND() % 100
IF r <= 10 THEN
a = 0
b = 0
c = 0
d = 0.16
e = 0
f = 0
ELSE IF r > 1 AND r <=86 THEN
a = 0.85
b = 0.04
c = -.04
d = 0.85
e = 0
f = 1.60
ELSE IF r > 86 AND r <=93 THEN
a = 0.2
b = -.26
c = 0.23
d = 0.22
e = 0
f = 0.16
ELSE
a = -.15
b = 0.28
c = 0.26
d = 0.24
e = 0
f = 0.44
END IF
newx = ((a * xy[1]) + (b * xy[2]) + e)
newy = ((c * xy[1]) + (d * xy[2]) + f)
xy[1] = newx
xy[2] = newy
gfx::pixelRGBA s, INT(xy[1]*40+300), INT(-xy[2]*40+450), 0, 210, 55, 255
END SUB
ts = gfx::Time()
FOR w=1 TO 30000
Fern
NEXT
te = gfx::Time()
gfx::stringColor s, 20, 15, "Time: " & FORMAT("%.4f",(te-ts)/1000) & " Seconds." & CHR(0), 0xffffffff
gfx::Update
WHILE gfx::KeyName(1) <> "+escape"
WEND
gfx::Close
.