Closed nippur72 closed 5 years ago
I'm not sure, why you don't see a speed improvement here!? When I run both programs side by side, the compiled version is almost 3 times faster than the interpreted one. It's not more mainly because of the SIN call, which is very expensive (and the rest is quit a lot of fp math as well) and the compiler doesn't do anything to speed it up, because it uses the ROM routines for floating point math...except for your SQR call. It will accelerate that one slightly.
Doh!
For some very odd reason, the following shell command runs two instances of VICE but loads the SAME .prg
x64 3dfun_c64.prg & x64 3dfun_c64_mospeed.prg
(it's a Windows 10 x64 system).
Run them separately and the world is ok again! Thanks!
And yes, the speed gain is about 3x. Very nice, love this compiler.
I have a strange case where a BASIC program results in almost no speed improvement when compiled with Mospeed. I'm trying to figure out the reason... my suspect it's the floating point ops being the bottleneck, but I am not sure.
It's a 3d-plot of a circular sine function. It's a mixture of BASIC and ML (for plotting on the screen). I wrote it with asmproc, a language tool of my own.
You can run the two side by side in VICE and see no gain:
Also:
Do you have any clue?
Edit: this is what is given to mospeed: