![]() |
|
interesting performance differences with sub/endsub - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://forum.boriel.com/forumdisplay.php?fid=16) +---- Thread: interesting performance differences with sub/endsub (/showthread.php?tid=383) |
interesting performance differences with sub/endsub - nitrofurano - 2011-10-08 i were trying to make some experiences with display memory byte sequence references from coco2 (pmode 4) and msx1 (screen 2) first i tried these: coco2-pmode4 with sub/endsub (around 49 seconds): Code: dim a1, a2, v1, i as integermsx1-screen2 with sub/endsub (around 60 seconds): Code: dim a1, a2, v1, i as integerbut when i don't use sub/endsub, i got these results as benchmark: coco2-pmode4 without sub/endsub (around 3 seconds): Code: dim i as integermsx1-screen2 with sub/endsub (around 7 seconds): Code: dim i as integerand i used the original zx-spectrum byte sequence display, i got this: with sub/endsub (around 30 seconds): Code: dim a1, a2, v1, i as integerwithout sub/endsub (around 0.25 seconds or less): Code: dim i as integerthe question: what is causing so large performances differences from my expectations (i expected faster on the slower ones), and should i do for optimizing this? |