Unity versus Visual Studio
I've decided to switch from Flash to some newer technology. I've found a project on github (https://github.com/Danakh/oldies-bc-as3converter) to convert my actionscript to C#, so I give a try to Unity and MonoGame (both using C# and are currently under active development).
I found MonoGame far more easy to use, as it only requires Visual Studio. But even with Xamarin, it target fewer platforms than Unity. Unity on the other hand does not integrate visual studio very well. But I think the 5.1 version broke the UnityVS plugin. The main issue is that I was astonished by how bad my library perform in Unity. Performances was on part with actionscript (on windows) while MonoGame runs the code 4 times faster.
So I make a little test computing Fibonacci sequence:
Of course, I do not use MonoGame there, it is a classical Visual Studio project. The code is in the linked file as the bottom. Here are the results:
|linear||171 ms||261 ms||400 ms||215 ms||328 ms||446 ms|
|recursive||171 ms||266 ms||1045 ms||215 ms||336 ms||1497 ms|
|linear + struct||372 ms||530 ms||1455 ms||424 ms||663 ms||1957 ms|
|recursive + struct||372 ms||535 ms||2065 ms||425 ms||676 ms||3530 ms|
|linear + class||564 ms||830 ms||2498 ms||1172 ms||1538 ms||4533 ms|
|recursive + class||564 ms||842 ms||4091 ms||1173 ms||1707 ms||24775 ms|
There are several interesting things to notice :
My library use a lot of small object with a lot of function calls ...