Old Mandelbrot test

Previous topic - Next topic

Qedo

I found an old program of Mandelbrot written in  GlBasic and Blitx 3D and comparing the speed in pixels per second was disappointing:
150 Kpixel GLBasic  and 1000 Kpixel Blitx3D
I tried to understand why GlBasic was so slow and I found that the bottleneck was the command SETPIXEL.
I replaced it with the MEM2SPRITE and voila the program has jumped to 2000 Kpixel!!!
Great GLBasic  :good:
Ciao

[attachment deleted by admin]

Moru

It looks like it is zooming into the Mandelbrot every frame. The black you see usually takes longer to compute than the colored areas because the loop has to run longer. So I would say the behaviour is expected.

Qedo

In fact, with increasing zoom, the iterations of the loop increases to a maximum of Mmax (128)
Ciao
Code (glbasic) Select

WHILE (j < mMAX) AND (m < 4.0)
j=j+1
m = r * r - i * i
i = 2.0 * r * i + yval
r = m + xval
WEND
RETURN j / mMAX

Kitty Hello

It's not using integers either, right? That example is veeeery old.

Qedo

The program should be 8 years old
Surely with the use of integers should speed up but I was interested to see why it was so slow compared to the equivalent Blitz3D.
Blitz3D version also does not use the integer
Ciao

bigsofty

MEM2SPRITE was a sneaky way to create a low level texture buffer, nice!  :D
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

backslider

Is the original GLBasic example my code?  =D

By the way, nice!  :good: