Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

Performance Tests of v2.0.0-rc1

Environment:

  • using DisplayLink director
  • iPod Touch 4th gen / iPad 1st gen
  • firmware: iOS 5.0.1 / iOS 4.3.5
  • cocos2d for iPhone v2.0.0-rc1
  • cocos2d compiled in Release mode, using unroll loops optimization
  • Xcode 4.3.2
  • Compiler: Apple LLVM 3.1

FPS:

  • FPS means Frames Per Second
  • The maximum FPS is 60 (Fastest possible speed)

Particle Tests

Tests

  • A particle size = 4 pixels
  • B particle size = 8 pixels
  • C particle size = 32 pixels
  • D particle size = 64 pixels

Subtests

  1. PointParticleSystem using a 32-bit texture (PNG)
  2. PointParticleSystem using a 16-bit texture (PNG)
  3. PointParticleSystem using a 8-bit texture (PNG)
  4. PointParticleSystem using a 4-bit texture (PVRTC)
  5. QuadParticle System using a 32-bit texture (PNG)
  6. QuadParticle System using a 16-bit texture (PNG)
  7. QuadParticle System using a 8-bit texture (PNG)
  8. QuadParticle System using a 4-bit texture (PVRTC)

iPad 1st gen Results

4000 particles
1 2 3 4 5 6 7 8
AN/A N/AN/AN/A60 60 60 60
BN/A N/AN/AN/A60 60 60 60
CN/AN/AN/AN/A~25~25~18~25
DN/AN/AN/AN/A~8 ~8 ~6 ~8

Analysis

ParticleTest seems to be up ~15% slower than v1.0.0.

Sprite Tests

Tests

  • A set randomly the position of the sprites. All the positions are inside of the screen
  • B set randomly the position / scale of the sprites. All the positions are inside of the screen
  • C set randomly the position / scale / rotation of the sprites. All the positions are inside of the screen
  • D All sprites are rendered outside the screen
  • E 80% of the sprites are positioned outside the screen. The other 20% is inside the screen
  • F Perform transform Scale and Rotate actions to all sprites. 100% of the sprites inside the screen
  • G Perform transform Scale and Rotate actions to all sprites. 20% of the sprites inside the screen

Subtests

  1. 1 sprite of 52×139 pixels. 32-bit texture
  2. 1 batched sprite of 52×139 pixels. 32-bit texture
  3. 1 batched sprite of 52×139 pixels. 16-bit texture
  4. 1 batched sprite of 52×139 pixels. 4-bit texture
  5. 14 sprites of 85 x 121 each. 32-bit texture
  6. 14 batched sprites of 85 x 121 each. 32-bit texture
  7. 14 batched sprites of 85 x 121 each. 16-bit texture
  8. 14 batched sprites of 85×121 each. 4-bit texture
  9. 64 sprites of 32×32 each . 32-bit Texture
  10. 64 batched sprites of 32×32 each. 32-bit Texture
  11. 64 batched sprites of 32×32 each. 16-bit Texture
  12. 64 batched sprites of 32×32 each. 4-bit texture

iPod Touch 4th Gen Results

250 sprites
1 2 3 4 5 6 7 8 9 10 11 12
A60 60 60 60 60 60 60 60 60 60 60 60
B60 60 60 60 ~55~5560 60 60 60 60 60
C60 60 60 60 ~50~5060 60 60 60 60 60
D60 60 60 60 60 60 60 60 60 60 60 60
E60 60 60 60 60 60 60 60 60 60 60 60
F60 60 60 60 60 60 60 60 60 60 60 60
G60 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~1560 ~5060
B ~8 ~8 ~8 ~8 ~6 ~6 ~6 ~6~15~45~45~45
C ~8 ~8 ~8 ~8 ~6 ~6 ~6 ~6~1545 ~45~45
D~30 60 60 60~20 60 60 60~2060 60 60
E~22~50~51~51~17~40~40~40~1760 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

iPhone 4S (iOS 6.0.1) Results

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

Analysis

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)

Children Node Test

Environment:

  • iPod Touch 4th

ms: milliseconds, the lower the better.

Tests:

  1. Test A: Iterate array of sprites using the Fast Enumeration API
  2. Test B: Iterate array of sprites using the C API
  3. Test C: Add %10 of the sprites in the spritesheet with different Z order
  4. Test D: Remove %10 of the sprites from the spritesheet with different Z order
  5. Test E: Reorder %10 in a spritesheet
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

Analysis

Test not done yet.

Texture Loading Test

These tests weren't performed in v2.0.0 It is believed that they perform as fast as in v1.0.0

Memory

Bytes

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

Analysis

cocos2d v2.0 takes less memory to create objects than v1.0

Misc

Table Template

2000 sprites
1 2 3 4 5 6 7 8 9 10 11 12
A
B
C
D
E
F
G
perf_test/2_0_0.txt · Last modified: 2012/11/28 16:46 by rsanchezsaez
Trace: 2_0_0
Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0