Skip to content

Conversation

@camillobruni
Copy link
Contributor

@camillobruni camillobruni commented Dec 17, 2024

We could potentially miss a gc between the performance.mark calls for syncEndTime and asyncStartTime.

This PR changes the code to reuse the sync end times and marker for the async start.
This means we'll now also measure one additional performance.mark call.

An alternative would be to replace

  • const syncEndTime = performance.now();with
  • const syncEndTime = performance.mark(syncEndLabel).startTime;
    to have the same timestamp and one call less.

Summary 5 runs:

browser            Google Chrome          Firefox                Safari
version            131.0.6778.140         133.0                  18.1.1 (20619.2.8.11.12)
Score Before       32.07 ± 0.67%          27.228 ± 0.13%         32.75 ± 0.48%
Score  After       31.14 ± 0.54%          26.10 ± 0.79%          30.36 ± 0.68%

I have to re-run the detailed measurements tonight when my machine is not in use to reduce noise.

@camillobruni camillobruni requested a review from julienw December 17, 2024 09:45
Copy link
Member

@rniwa rniwa left a comment

Choose a reason for hiding this comment

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

Seems sensible to me.

Copy link
Contributor

@julienw julienw left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me as well.

@camillobruni
Copy link
Contributor Author

Just rerun the numbers and there is no measurable change.

browser       Google Chrome          Firefox                Safari
version       131.0.6778.205         133.0.3                18.1.1 (20619.2.8.11.12)
Score Main    32.60 ± 0.58%          28.66 ± 0.39%          33.59 ± 0.59%
Score PR      32.54 ± 0.52%          28.63 ± 0.61%          33.51 ± 0.99%

@camillobruni camillobruni merged commit faf9fff into WebKit:main Jan 6, 2025
4 checks passed
@camillobruni camillobruni deleted the 2024-12-17_no_hide_gc branch January 6, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants