A few months ago, a friend recommended that I try BunnyMark, a cute rendering benchmark. I have meant to port it to Haxe so I could use it to benchmark NME, so today I decided to give it a whirl.
The first two tests were performed on my laptop, using Flash Player and a compiled Windows application, using NME. The first test uses separate bitmap objects for each of the bunnies, so rendering performance relies more heavily on the display list.
Test 1 – Display List
10,000 bitmaps — Flash — 37 FPS
10,000 bitmaps — CPP — 29 FPS
The second test uses blitting to draw all of the bunnies on the same bitmap. Flash supports “copyPixels”, but NME also supports “drawTiles”, which performs much faster.
Test 2 – Blitting
10,000 objects — Flash — 59 FPS
10,000 objects — CPP — 60+ FPS
30,000 objects — Flash — 21 FPS
30,000 objects — CPP — 44 FPS
Blitting was the fastest rendering method in this benchmark. As fast as Flash performed, NME performed over two times faster.
Test 3 – Mobile Performance
The real question, in my mind, was how things would perform on a mobile device. In the original BunnyMark post I linked above, it said that Philippe tested BunnyMark using AIR on his Android phone, and was able to display 600 bunnies at 30 FPS. I wondered how many bunnies I would be able to display, using NME?
The Android phone I have for testing is an LG Optimus S. It has a 600 MHz processor, so it certainly is not the fastest Android phone on the market. I was able to render nearly 4,000 bunnies at 30 FPS. If Philippe and I were running the benchmark on the same phone, that would be a performance increase of seven times.