Benchmark results (internal data)


Versions

  • Canary 35
  • Safari 7
  • Firefox 27

Time to load and draw 5000 frames

HardwareBrowserRenderTimems
iMacCanarypixi-canvas54s
iMacCanarypixi-webgl58s
iMacCanarycanvas54s5.8ms
iMacFirefoxpixi-canvas75s8.3ms
iMacFirefoxpixi-webgl82s11.3ms
iMacFirefoxcanvas76s8.1ms
MacBookCanarypixi-canvas68s
MacBookCanarypixi-webgl83s
MacBookCanarycanvas76s

Time to just draw 5000 frames

HardwareBrowserFormatRenderTimems
iMacCanaryDDS DXT1webgl55s

Time to render 1 frame

HardwareBrowserFormatSizeFunctionms
iMacCanaryDDS DXT12.1MBload20-100ms
iMacCanaryDDS DXT12.1MBdraw0.04ms
iMacCanaryDDS GZIP271KBload
iMacCanaryDDS GZIP271KBdraw
iMacCanaryWEBP70KBload9ms
iMacCanaryWEBP70KBdraw24ms
iMacCanaryDDS CRN70KBload30ms
iMacCanaryDDS CRN70KBdraw0.04ms
iMacCanaryJPEG94KBload25ms
iMacCanaryJPEG94KBdraw6ms
iMacCanaryPNG590KBload6ms
iMacCanaryPNG590KBdraw30ms

About ST3C DXT1 DDS CRN

ST3C (S3 Texture Compression)

Group of related lossy texture compression algorithms, supported by most GPUs in Mac/PCs

DXT1 (Block Compression 1)

Smallest ST3C algorithm, 1-bit Alpha, compression ratio 6:1

DDS (DirectDraw Surface)

Container file format for storing ST3C textures

CRN (DXTn Real-time Transcoding)

Container file format for transcoding crunched ST3C textures

DDS vs JPEG

  • Drawing a DXT1 texture is over 100 times faster than JPEG
  • The DXT1 texture is transferred directly to the GPU, unlike JPEG
  • The DXT1 uses 6 times less GPU memory
  • File size is big, but when gzipped it's smaller than PNG

CRN vs JPEG

  • It transcodes to DXT1 so has all DXT1 benefits
  • File size is very small, even smaller than JPEG (!)
  • Requires to transcode on client side, so there is a CPU penalty
  • However transcoding CRN->DXT1 is faster than decoding and tranfering JPEG->GPU
  • JPEG->GPU texture uploading blocks the main thread and is slow
  • Transcoding a CRN can be done async, and even offloaded to a WebWorker
  • Currently the Crunch library is compiled to JS with Emscripten, so enabling asm.js would make the transcoding even faster
  • Compressing CRN vs libjpeg-turbo benchmarks still need to be done

Links

ECT1 texture format works on all Android devices http://developer.android.com/tools/help/etc1tool.html

WebGL also http://blog.tojicode.com/2011/12/compressed-textures-in-webgl.html

Crunch https://code.google.com/p/crunch/

Fast compression http://www.fastcompression.com/

DXT1 crunch WebGL http://www-cs-students.stanford.edu/~eparker/files/crunch/decode_test.html

WebGL Texture Utils https://github.com/gunta/webgl-texture-utils#webgl-texture-utils