Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initialise $x[$i] to new listref [0] in one statement, instead of assigning list element 0 separately * Calling standard max() function avoids temporary variables when compared items are different * Write loops in idiomatic form with ranges * This was intended as a readability change, but I observed that when generating diffs on a large text files the performance is slightly improved %time perl diff.old -u bc bc.new > /dev/null real 0m11.003s ... real 0m10.845s ... real 0m10.965s %time perl diff.new -u bc bc.new > /dev/null real 0m9.470s ... real 0m9.546s ... real 0m9.329s
- Loading branch information