AS3 vs haXe performance

A while back I saw a documentary about fractals. I was amazed by how simple the algorithm required to generate them are, so I decided to try to make one myself using flash.

Today, all of a sudden, I got the idea to port that code to haxe, just to see if there were any noticeable difference in performance.

And yes, there’s a huge difference. In haxe, the fractal is generated in slightly less than half the time compared to AS3. And the color cycling animation I made runs almost three times as fast in haxe on my 2.66 Ghz core 2 duo MacBook. That is pretty awesome.

See for yourself:

Click here to view the AS3 fractal.

Click here to view the haXe fractal.

And if you want to peek at the source code, you can grab it here.

Tags: , , ,

2 Responses to “AS3 vs haXe performance”

  1. [...] try this out, I applied it to the fractal code I used in an earlier post. In this particular case I can assign an index value to each pixel, instead of a color, and then [...]

  2. [...] It seems to be much efficient to use haXe than Flash to publish swf, according to Joacim… [...]

Leave a Reply