Run details:
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
Chrome 73
Windows 8.1
Desktop
5 years ago
Test name Executions per second
postMessage 1 string arg 158119.4 Ops/sec
postMessage 2 string arr 56471.8 Ops/sec
postMessage 3 string arr 22364.5 Ops/sec
postMessage 4 string arr 9043.6 Ops/sec
no postMessage no arguments 50127968.0 Ops/sec
postMessage Number 49743.3 Ops/sec
drawImage 6996.6 Ops/sec
postImage Numbers ([id, x, y, angle, scale_x, scale_y, alpha]) 15609.1 Ops/sec
postImage Numbers (String(id, x, y, angle, scale_x, scale_y, alpha)) 43249.6 Ops/sec
Script Preparation code:
Tests:
  • postMessage 1 string arg

  • postMessage 2 string arr

  • postMessage 3 string arr

  • postMessage 4 string arr

  • no postMessage no arguments

  • postMessage Number

  • drawImage

  • postImage Numbers ([id, x, y, angle, scale_x, scale_y, alpha])

  • postImage Numbers (String(id, x, y, angle, scale_x, scale_y, alpha))


;