Skip to content

doxbee-async and doxbee-promise: add side-effects#247

Open
camillobruni wants to merge 8 commits intoWebKit:mainfrom
camillobruni:2025-12-11_doxbee
Open

doxbee-async and doxbee-promise: add side-effects#247
camillobruni wants to merge 8 commits intoWebKit:mainfrom
camillobruni:2025-12-11_doxbee

Conversation

@camillobruni
Copy link
Contributor

Add Queryish.count and use it as simple side-effect in the dummy functions.

@netlify
Copy link

netlify bot commented Dec 11, 2025

Deploy Preview for webkit-jetstream-preview ready!

Name Link
🔨 Latest commit 4483608
🔍 Latest deploy log https://app.netlify.com/projects/webkit-jetstream-preview/deploys/694a6f45b1424300081cd0d3
😎 Deploy Preview https://deploy-preview-247--webkit-jetstream-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@camillobruni
Copy link
Contributor Author

I could not really observe any score changes (might be worth rechecking):
Before:

command = ~/.jsvu/bin/javascriptcore ./cli.js -- doxbee-async
runs    = 51
sum     = 23295.31
avg     = 456.7707843137255
geomean = 455.30697949601443
min     = 344.0        max = 490.0
result  = 457.0 ± 35.0(7.7%)
................................................................................
Skipping 5 outliers
   5                                                                ▅█▂ █▅  
   0 ▄         ▄  ▄       ▄               ▄    ▇▄▄▄▄▄ ▇▄▇▄   ▇     ▇███▄██▄▄
    365                                425.5                                 486
................................................................................
command = ~/.jsvu/bin/v8 ./cli.js -- doxbee-async
runs    = 29
sum     = 13575.28
avg     = 468.11310344827587
geomean = 467.95769924053457
min     = 443.0        max = 484.0
result  = 468.0 ± 12.0(2.6%)
................................................................................
Skipping 2 outliers
   2                                                          █    ██       
   0  █  █     █          ██ █ █                 █  ██ ██ █ █████  ███  █  █
    443                                462.0                                 481
................................................................................

After:

command = ~/.jsvu/bin/javascriptcore ./cli.js -- doxbee-async
runs    = 46
sum     = 20927.64
avg     = 454.9486956521739
geomean = 453.7823474275458
min     = 350.0        max = 483.0
result  = 455.0 ± 32.0(6.94%)
................................................................................
Skipping 4 outliers
   3                                                         ▃ ▃    ▃██ █  ▃
   0  ▆ ▆ ▆            ▆            ▆    ▆ ▆▆ ▆▆▆ ▆ ▆ ▆▆    ▆█▆█▆▆▆▆███▆█▆▆█
    387                                434.5                                 482
................................................................................

command = ~/.jsvu/bin/v8 ./cli.js -- doxbee-async
runs    = 29
sum     = 13533.57
avg     = 466.6748275862069
geomean = 466.2300745843536
min     = 418.0        max = 496.0
result  = 467.0 ± 21.0(4.43%)
................................................................................
Skipping 2 outliers
   2                      ██ █                                            █ 
   0  █   █ █ █           ██ ███ █  ██      █   ██         █ █      █ ██ ██ 
    437                                465.5                                 494
................................................................................

@Constellation
Copy link
Member

I suggest doing similar in doxbee-promise too. Right now, dummy_1 etc. are not having side-effect much (it is just returning Promise.resolve(undefined).

@camillobruni camillobruni changed the title doxbee-async: add side-effects doxbee-async and doxbee-promise: add side-effects Dec 15, 2025
@camillobruni
Copy link
Contributor Author

Weirdly enough I start to see perf differences now

Engine Before After
JSC 333.0 ± 20.0(5.98%) 274.0 ± 7.60 (2.76%)
V8 563.0 ± 27.0(4.76%) 544.0 ± 30.0(5.51%)

}
async function dummy_2(a) {
Queryish.count++;
}
Copy link
Member

@Constellation Constellation Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They should avoid using async, and do

function dummy_1() {
  Queryish.count++;
  return Promise.resolve(undefined);
}

function dummy_2(a) { 
  Queryish.count++;
  return Promise.resolve(undefined);
}

because that's the purpose of this doxbee-promise (not async, that's tested in doxbee-async. testing chain of promises).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still observing quite a diff even with this fixed for JSC (almost none for V8):

Before: 321.0 ± 11.0(3.35%)
After: 309.0 ± 13.0(4.24%)

@camillobruni camillobruni added the v3.0-block blocking task for v3.0 release label Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3.0-block blocking task for v3.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants