Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port(gas_price_service): bring optimizations from 0.40.4 for cumulative_pct_change to master #2645

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rymnc
Copy link
Member

@rymnc rymnc commented Jan 29, 2025

Linked Issues/PRs

Description

This pull request includes changes to the fuel-core service to refactor and improve the handling of gas price calculations. The most important changes involve moving the cumulative_percentage_change function to a more appropriate module and updating the relevant imports accordingly.

Refactoring and code organization:

Perf improvements

previous asm for ROUNDING_ERROR_COMPENSATION:

        addsd   xmm1, xmm2
        movsd   xmm0, qword ptr [rip + .LCPI0_5]
        cmpltsd xmm0, xmm2
        andpd   xmm1, xmm0
        andnpd  xmm0, xmm2
        orpd    xmm0, xmm1

new asm for ROUNDING_ERROR_COMPENSATION:

        cmpltsd xmm1, xmm2
        movsd   xmm0, qword ptr [rip + .LCPI0_5]
        andpd   xmm0, xmm1
        addsd   xmm0, xmm2

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

@rymnc rymnc self-assigned this Jan 29, 2025
@rymnc rymnc requested a review from a team January 29, 2025 07:55
AurelienFT
AurelienFT previously approved these changes Jan 29, 2025
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