Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Windows
Desktop
6 months ago
Test name Executions per second
Native Event listeners 210.2 Ops/sec
Native Event listener with callbacks array 5981.4 Ops/sec
Custom EventTarget 266.5 Ops/sec
Custom EventTarget with callbacks array 6087.0 Ops/sec
Fake listeners array 30030.0 Ops/sec
Tests:
  • Native Event listeners

  • Native Event listener with callbacks array

  • Custom EventTarget

  • Custom EventTarget with callbacks array

  • Fake listeners array