My timings on this code suggest it's possible to make the DRAW command quite a lot faster. It takes about 9.2 seconds after ZX Basic compiles it and run on a 48K spectrum.

Running exactly the same code on a spectrum 128 with Beta Basic 4.0 added (find at: http://www.worldofspectrum.org/infoseekid.cgi?id=0007956 ) completes in 5.9 seconds. (56% faster execution) Remember, this is running in an extended variant of basic. In the beta basic newsletter 12 he describes a method of queuing up plot and draw commands into a string variable (as if it was an array), and using a very fast draw method to draw the whole array. I haven't tried that yet, but I get the impression it will be far faster (for anything we'd need to draw on screen more than once, anyway - creating the 'array' is still quite slow)

I think Andrew wright's draw code must be pretty staggeringly fast to make that much difference in an interpreted language, though beta basic is generally faster. He has stated in material that his draw code is 2.5 to 3 times as fast as the Sinclair ROM code.

Boriel, your circle routine is incredibly fast (beta basic has, I think, something very similar) - and you've said that the draw routine is faster than basic. I'm not sure I can see the difference in speed with yours over sinclair. Here's a source you might want to look at for a much faster algorithm.

Effectively, ZX Basic DRAW is faster than BETA BASIC 3.1 one, but slower than 4.x. I will try to improve it. ZX BASIC Draw uses Bresenham's algorithm (the same as circle) wich is quite fast. I will try to examine BETA BASIC 4.x Draw to see what changes.

Regarding to the "STRING" method, this is just a "Polyline Draw", and it will be faster than normal coordinate one, and take less memory: You store each (x, y) pair coordinate in two bytes, and draw from one to another. You can use a string for that (generate cords x, y appending CHR$(x) + CHR$(y) to the string), and later creating an asm routine which traverses the string and call draw subsequently.