Optmizied LCS algorithm for diff.php
Review Request #70 - Created Feb. 28, 2009 and submitted
Information | |
---|---|
Cosmin Gheorghe | |
infoarena | |
Reviewers | |
hackers | |
I made Lcs run in o(N * M) time with O(N + M) memory. It is written in C++ and diff.php runs the binary.
-
trunk/common/diff.php (Diff revision 1) -
White space.
-
trunk/common/diff.php (Diff revision 1) -
1000 is too small. Put a bigger limit.
-
trunk/common/diff.php (Diff revision 1) -
1000 is too small. Put a bigger limit.
-
trunk/common/diff.php (Diff revision 1) -
Remove this.
-
trunk/common/lcs.cpp (Diff revision 1) -
Add some instrunctions how to compile this. (-O2 etc.)
-
trunk/common/lcs.cpp (Diff revision 1) -
Add some explanations about the Unicode issues, and why & how we use UTF-32.
-
trunk/common/lcs.cpp (Diff revision 1) -
Lines are at most 80 chars long.
Review request changed
Change Summary:
Deleted whitespaces Changed the read limit to 10000 Deleted the print_log Added extra comment on how to compile lcs.cpp and why we use UTF-32
Diff: |
Revision 2 (+165 -20) |
---|
Review request changed
Review request changed
Review request changed
Change Summary:
Changed the source of lcs to check if it doesn't read (this also solves some warnings) Changed the setup script to compile this source when run.
Diff: |
Revision 10 (+196 -19) |
---|