Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0
Firefox 104
Windows
Desktop
2 years ago
Test name Executions per second
Native Event listeners 180.8 Ops/sec
Native Event listener with callbacks array 3944.0 Ops/sec
Custom EventTarget 203.4 Ops/sec
Custom EventTarget with callbacks array 4141.4 Ops/sec
Fake listeners array 9541.6 Ops/sec
Tests:
  • Native Event listeners

  • Native Event listener with callbacks array

  • Custom EventTarget

  • Custom EventTarget with callbacks array

  • Fake listeners array