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 76323.9 Ops/sec
postMessage 2 string arr 45311.1 Ops/sec
postMessage 3 string arr 25338.5 Ops/sec
postMessage 4 string arr 18917.0 Ops/sec
no postMessage no arguments 28092024.0 Ops/sec
postMessage Number 46985.2 Ops/sec
drawImage 4917.6 Ops/sec
postImage Numbers ([id, x, y, angle, scale_x, scale_y, alpha]) 15146.8 Ops/sec
postImage Numbers (String(id, x, y, angle, scale_x, scale_y, alpha)) 43524.8 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))


;