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

assert: make myers_diff function more performant #56303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

puskin94
Copy link
Contributor

@puskin94 puskin94 commented Dec 18, 2024

now that Myers diff has landed, I took the liberty to review the code I wrote to look for improvements that would squeeze some more performance out of the comparison mechanism

  • simplified some logic
  • reviewed loops and introduced more breaking points to make them run for less cycles
  • reduced memory allocation using Int32Array

Refs: #54862

@nodejs-github-bot nodejs-github-bot added assert Issues and PRs related to the assert subsystem. needs-ci PRs that need a full CI run. labels Dec 18, 2024
@puskin94 puskin94 force-pushed the assert-make-myers-more-performant branch from 525ec2c to a00f603 Compare December 18, 2024 10:52
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 82.85714% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.16%. Comparing base (6b3937a) to head (c364630).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/assert/myers_diff.js 82.85% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56303      +/-   ##
==========================================
- Coverage   89.17%   89.16%   -0.02%     
==========================================
  Files         662      662              
  Lines      191672   191685      +13     
  Branches    36884    36883       -1     
==========================================
- Hits       170922   170909      -13     
- Misses      13614    13635      +21     
- Partials     7136     7141       +5     
Files with missing lines Coverage Δ
lib/internal/assert/myers_diff.js 89.38% <82.85%> (-0.68%) ⬇️

... and 36 files with indirect coverage changes

@puskin94 puskin94 force-pushed the assert-make-myers-more-performant branch from a00f603 to f719438 Compare December 18, 2024 13:21
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 19, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 19, 2024
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@meixg meixg added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2024
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@pmarchini pmarchini added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 9, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 9, 2025
@nodejs-github-bot
Copy link
Collaborator

@marco-ippolito
Copy link
Member

marco-ippolito commented Jan 9, 2025

can you rebase? I think the failure is related to that

@BridgeAR
Copy link
Member

BridgeAR commented Jan 9, 2025

@puskin94 can you please rebase and force push to the branch? :)

A merge commit can not be picked up by the tooling

@puskin94 puskin94 force-pushed the assert-make-myers-more-performant branch from 31c27d3 to c364630 Compare January 9, 2025 14:58
@BridgeAR BridgeAR added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 10, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 10, 2025
@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants