[UTIL] PokittoBench

PokittoBench1

PokittoBench2

Hello again!

I recently was making some performance optimizations in a game and considered trying to merge some of my changes into PokittoLib, but I realized I didn’t have a good way to measure how much my changes would actually impact performance outside of my specific game. I decided to write a simple benchmark to compare my changes, and I thought I would post it here in case anybody else wanted to use it.

The benchmark measures how many of a particular item can be drawn before the framerate drops below 30fps. I compared the difference between enabling overclocking or running the Pokitto at stock clocks, and (assuming that overclocking doesn’t change the results of getTime) by enabling overclocking you can draw about:

  • 229 more 8x8 rectangles
  • 69 more 16x16 rectangles
  • 184 more 8x8 circles
  • 68 more 16x16 circles
  • 339 more 8x8 bitmaps
  • 109 more 16x16 bitmaps
  • 274 more 5x7 characters

…before the framerate drops below 30fps. I thought that was an interesting result. Also interesting but not unexpected: the emulator has different performance characteristics than the real Pokitto.

It might also be interesting if someone ported it to other hobbyist consoles, where it could be used to compare the drawing libraries + processing power of each platform.

The benchmark can be compiled for multiple modes, although right now it doesn’t work correctly on any mode that doesn’t use 16 colors (4bpp).

Here’s the source code:

Here is the benchmark compiled to use mode 15, both with the default clocks and overclocked:

PokittoBench-orig.bin (47.4 KB)

PokittoBench-oc.bin (47.4 KB)

The bitmaps used in the benchmark:

pokitto8x8.bmp (234 Bytes)

pokitto16x16.bmp (330 Bytes)

8 Likes