Tuesday, 31 May 2016

Simplistic benchmarking with 2D vector graphics

I have some ideas bubbling for an upcoming project so I was toying around with a simple way of measuring graphics performance, in particular, very primitive 2D vector rendering - i.e. drawing a bunch of lines (1000 in this case) to the backbuffer and flipping it. I rendered 250 frames and measured the result.

I was mostly interested in how close to the native OpenGL implementation I was in each language.

I excluded C++ and anything that felt like it would hinder my productivity.  I want to finish this project QUICKLY to prove a point.




Language Real User Sys Working Set (MB)
Java2D 0:02.69 4.04 0.38 500.39
Python2 OpenGL 0:04.84 3.67 0.29 199.36
Python3 OpenGL 0:04.89 4.38  0.25 198.83
Java LWJGL 0:05.08 0.94 0.32 326.48
JavaFX 0:05.67 2.35 0.57 546.78
BlitzMax 0:05.52 0.45 0.23 84.28
Java2D
(Anti-aliased Software Rendering)
0:11.07


12.79 0.49 500.39
Python2 SDL 0:11.69 10.71 0.28 196.14
Python3 SDL 0:12.64 11.53 0.29 209.59

The results are pretty clear to me. It's either LWJGL or BlitzMax for this project. I'm slightly torn in all honesty - the IDE for BlitzMax is missing a LOT of necessary features like refactoring. Java has a very comprehensive API to call upon...

However, BlitzMax is very quick to get something going.

Update: I've added plain old Java2D - and it flies. Very interesting.