Environment:
DisplayLink directorRelease mode, using unroll loops optimizationFPS:
| 4000 particles | ||||||||
|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
| A | N/A | N/A | N/A | N/A | 60 | 60 | 60 | 60 |
| B | N/A | N/A | N/A | N/A | 60 | 60 | 60 | 60 |
| C | N/A | N/A | N/A | N/A | ~25 | ~25 | ~18 | ~25 |
| D | N/A | N/A | N/A | N/A | ~8 | ~8 | ~6 | ~8 |
ParticleTest seems to be up ~15% slower than v1.0.0.
| 250 sprites | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |
| A | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 |
| B | 60 | 60 | 60 | 60 | ~55 | ~55 | 60 | 60 | 60 | 60 | 60 | 60 |
| C | 60 | 60 | 60 | 60 | ~50 | ~50 | 60 | 60 | 60 | 60 | 60 | 60 |
| D | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 |
| E | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 |
| F | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 |
| G | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 60 |
| 2000 sprites | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |
| A | ~8 | ~8 | ~8 | ~8 | ~7 | ~7 | ~7 | ~7 | ~15 | 60 | ~50 | 60 |
| B | ~8 | ~8 | ~8 | ~8 | ~6 | ~6 | ~6 | ~6 | ~15 | ~45 | ~45 | ~45 |
| C | ~8 | ~8 | ~8 | ~8 | ~6 | ~6 | ~6 | ~6 | ~15 | 45 | ~45 | ~45 |
| D | ~30 | 60 | 60 | 60 | ~20 | 60 | 60 | 60 | ~20 | 60 | 60 | 60 |
| E | ~22 | ~50 | ~51 | ~51 | ~17 | ~40 | ~40 | ~40 | ~17 | 60 | 60 | 60 |
| F | ~14 | ~15 | ~15 | ~17 | ~8 | ~10 | ~12 | ~13 | ~13 | ~51 | ~55 | ~55 |
| G | ~14 | ~55 | ~55 | ~55 | 12 | ~40 | ~50 | ~51 | ~13 | ~51 | ~55 | ~55 |
cocos2d 2.1 develop branch (28-11-2012). Test performed with device not connected to Xcode.
| 2000 sprites | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |
| A | ~36 | ~43 | ~44 | ~45 | ~27 | ~30 | ~32 | ~32 | ~26 | 60 | 60 | 60 |
| B | ~36 | ~38 | ~38 | ~39 | ~26 | ~26 | ~27 | ~28 | ~26 | 60 | 60 | 60 |
| C | ~35 | ~33 | ~37 | ~38 | ~23 | ~25 | ~25 | ~26 | ~26 | 60 | 60 | 60 |
| D | 60 | 60 | 60 | 60 | ~41 | 60 | 60 | 60 | ~39 | 60 | 60 | 60 |
| E | ~52 | 60 | 60 | 60 | ~33 | 60 | 60 | 60 | ~32 | 60 | 60 | 60 |
| F | ~26 | ~53 | ~55 | 60 | ~21 | ~40 | ~48 | ~50 | ~20 | 60 | 60 | 60 |
| G | ~26 | 60 | 60 | 60 | ~21 | 60 | 60 | 60 | ~20 | 60 | ~59 | 60 |
Sprite seems to pretty similar to v1.0.0. There are some exceptions where the performance seems to be a bit faster (2 or 3%), and other exceptions where the performances is slower (up to 10% slower)
Environment:
ms: milliseconds, the lower the better.
Tests:
| 1500 sprites | |
|---|---|
| A | ~0.8 |
| B | ~0.7 |
| C | ~32 |
| D | ~59 - ~76 |
| E | ~12 |
| 2500 sprites | |
|---|---|
| A | ~1.4 |
| B | ~1.3 |
| C | ~100 |
| D | ~190 - ~220 |
| E | ~12 |
Test not done yet.
These tests weren't performed in v2.0.0 It is believed that they perform as fast as in v1.0.0
How many bytes it takes to create an empty instance, without the possible inner mallocs.
| Class | bytes |
|---|---|
| CCNode | 176 |
| CCLayer | 176 |
| CCScene | 176 |
| CCSprite | 368 |
| CCSpriteBatchNode | 192 |
| CCTexture2D | 48 |
| CCLabelTTF | 400 |
cocos2d v2.0 takes less memory to create objects than v1.0
| 2000 sprites | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |
| A | ||||||||||||
| B | ||||||||||||
| C | ||||||||||||
| D | ||||||||||||
| E | ||||||||||||
| F | ||||||||||||
| G | ||||||||||||