Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Chrome 104
Linux
Desktop
2 years ago
Test name Executions per second
drawImage on the main thread 393170.4 Ops/sec
drawImage on a worker thread (passing messages as Strings) 476067.5 Ops/sec
drawImage on a worker thread (passing messages as ArrayBuffer(100)) 347300.0 Ops/sec
drawImage on a worker thread (Transferable messages as ArrayBuffer(100)) 70593.0 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))