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

Memory optimisation #2

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

Memory optimisation #2

wants to merge 1 commit into from

Conversation

Seb35
Copy link

@Seb35 Seb35 commented Oct 27, 2018

Only the current and the previous rows are needed. This trick is a great improvement for long texts: it reduces space from O(mn) to O(n).

In a latter commit it could be slightly improved to O(min(m,n)) by swapping the two texts when needed.

Only the current and the previous rows are needed. This trick is a
great improvement for long texts: it reduces space from O(mn) to
O(n). (It could be still slightly improved to O(min(m,n)) by
swapping the two texts.)
@codecov-io
Copy link

codecov-io commented Oct 27, 2018

Codecov Report

Merging #2 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #2   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines         113    113           
=====================================
  Hits          113    113
Impacted Files Coverage Δ
src/Solver.php 100% <100%> (ø) ⬆️
src/MatchesSolver.php 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb35375...0248a96. Read the comment docs.

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