Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133
Linux
Desktop
one month ago
Test name Executions per second
Async Wait 50ms 20.0 Ops/sec
Async Wait 500ms 2.0 Ops/sec
Async Wait 100ms 10.0 Ops/sec
Script Preparation code:
AخA
 
function wait(ms) {
    return new Promise(res => setTimeout(() => { res(ms); }, ms));
}
Tests:
  • Async Wait 50ms [Async/Deferred]

     
    await wait(50);
    deferred.resolve();
  • Async Wait 500ms [Async/Deferred]

     
    await wait(500);
    deferred.resolve();
  • Async Wait 100ms [Async/Deferred]

     
    await wait(100);
    deferred.resolve();