![]() |
interesting performance differences with sub/endsub - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://www.boriel.com/forum/forumdisplay.php?fid=16) +---- Thread: interesting performance differences with sub/endsub (/showthread.php?tid=383) |
interesting performance differences with sub/endsub - nitrofurano - 10-08-2011 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 integer msx1-screen2 with sub/endsub (around 60 seconds): Code: dim a1, a2, v1, i as integer but 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 integer msx1-screen2 with sub/endsub (around 7 seconds): Code: dim i as integer and 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 integer without sub/endsub (around 0.25 seconds or less): Code: dim i as integer the 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? |