Optimisation?

Monkey Forums/Monkey Programming/Optimisation?

CopperCircle(Posted 2013) [#1]
Hi, here is come code I converted awhile back from C# to Monkey, could anyone help with optimising it?

Thanks.

http://www.monkeycoder.co.nz/Community/posts.php?topic=3521


AdamRedwoods(Posted 2013) [#2]
i suggest using html5+Google Chrome browser, which has a great profiler in it (control+alt+J).


Beaker(Posted 2013) [#3]
It all depends what you want to optimise and why: drawing, maths, garbage etc?


ziggy(Posted 2013) [#4]
Also, notice that several targets have very different performance "profiles". JavaScript behaved very different to C++ or Java.


CopperCircle(Posted 2013) [#5]
Thanks, I will try the html5 profiler, I am aiming for it to run on iOS, Android & WP8 and will be calling it once per update so looking to optimise the math and create less garbage...


muddy_shoes(Posted 2013) [#6]
Step 1 of optimising should be to set up your test code to run on a fixed data-set. Create a suitably representative/complicated list of line points that you can repeatedly run the reduction process on to get reliable timing.

If you do that and post it I'll be glad to look at the code later and see if I can speed it up for you.


CopperCircle(Posted 2013) [#7]
Thanks, I will create some test code and post it.