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 181376.3 Ops/sec
postMessage 2 string arr 104735.2 Ops/sec
postMessage 3 string arr 82217.0 Ops/sec
postMessage 4 string arr 83092.2 Ops/sec
no postMessage no arguments 161178416.0 Ops/sec
postMessage Number 108036.6 Ops/sec
drawImage 24655.7 Ops/sec
postImage Numbers ([id, x, y, angle, scale_x, scale_y, alpha]) 52314.2 Ops/sec
postImage Numbers (String(id, x, y, angle, scale_x, scale_y, alpha)) 76349.7 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))


;