+ 1
Drawing a large circle in qbasic using pset takes much time but html or other such languages displays it immediately,why?
4 Respostas
+ 2
PSET draws _one pixel at a time_ whereas a browser with HTML can read ahead and render things quicker with an optimised pipeline. It also runs natively, whereas Qbasic needs old hardware or virtualization to run -- both are slowdowns. Browsers can draw a circle with SVG (if you don't expressly draw each pixel). Browsers can use multiple threads and more cache because they are built for today's hardware. The Qbasic interpreter is not. It is a 16-bit application.
As for other languages, they either have faster interpreters, compile the code (native machine language is much faster), or use JIT (just in time compiling is a middle ground for interpreters or virtual machines to speed up execution).
Qbasic is very old (not to be confused with QB64). That you can even run it requires an ancient machine (slow down) or virtualization (slow down) like DosBox, built-in protected mode (if your system is old and still supports it), or a virtual machine running MS-DOS.
If you like the QBasic language, use QB64 which is modern and includes new native commands for loading image files.
+ 1
can't we increase the speed of pset in a qbasic as drawing large circle directly using circle keyword?
+ 1
Yes. CIRCLE will draw almost instantly. For basic drawing, it's a better, but it only supports x, y, radius, colour. You cannot draw an oval as far as I recall and you cannot perform colour dithering on the edges.
+ 1
Thanks