Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Chrome 105
Linux
Desktop
2 years ago
Test name Executions per second
drawImage on the main thread 423050.7 Ops/sec
drawImage on a worker thread (passing messages as Strings) 631271.1 Ops/sec
drawImage on a worker thread (passing messages as ArrayBuffer(100)) 463383.7 Ops/sec
drawImage on a worker thread (Transferable messages as ArrayBuffer(100)) 69731.8 Ops/sec
Script Preparation code:
Tests:
  • drawImage on the main thread

  • drawImage on a worker thread (passing messages as Strings)

  • drawImage on a worker thread (passing messages as ArrayBuffer(100))

  • drawImage on a worker thread (Transferable messages as ArrayBuffer(100))