ActionScript & Flash
Measure rendering and update costs
A useful speed test changes one variable at a time. Compare the same number of sprites, the same movement rules and the same output resolution before deciding whether display objects, bitmap copies or another rendering path is faster for your game.
Warm up the test, run multiple samples and report a distribution rather than a single best frame. Record update time separately from draw time, and count allocations when periodic garbage collection causes visible stutters.
A benchmark with identical stationary sprites can hide costs that appear in real play. Include animation changes, transparency, rotation and scene transitions. Keep an unoptimized baseline so each improvement can be checked for correctness.
A small benchmark plan
- Render 100, 500 and 1,000 identical moving objects.
- Repeat with animation and transparency enabled.
- Measure median frame time and the slowest one percent.
- Verify positions and collision results remain identical.