Skip to content

Conversation

@anba
Copy link
Contributor

@anba anba commented Nov 7, 2025

BubbleRelativeDuration can be called largestUnit being a smaller unit than smallestUnit, but the algorithm only returns early when both units are equal to each other. Removing the early return and changing the loop condition and loop counter simplifies this operation a bit.

`BubbleRelativeDuration` can be called `largestUnit` being a smaller
unit than `smallestUnit`, but the algorithm only returns early when both
units are equal to each other. Removing the early return and changing
the loop condition and loop counter simplifies this operation a bit.
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.96%. Comparing base (53731c2) to head (38d6652).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3179   +/-   ##
=======================================
  Coverage   96.96%   96.96%           
=======================================
  Files          22       22           
  Lines       10219    10219           
  Branches     1841     1841           
=======================================
  Hits         9909     9909           
  Misses        261      261           
  Partials       49       49           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

This doesn't seem like much of an improvement? The Repeat clause is currently written in such a way that it's obvious and easy to implement with a for loop, but this refactor makes it harder since the increment no longer happens at the end of the loop.

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.

2 participants