Page MenuHomePhabricator
Paste P8510

(An Untitled Masterwork)
ActivePublic

Authored by awight on May 10 2019, 11:58 AM.
diff --git a/Wikidiff2.h b/Wikidiff2.h
index 805e610..c32f76d 100644
--- a/Wikidiff2.h
+++ b/Wikidiff2.h
@@ -101,6 +101,7 @@ inline bool Wikidiff2::AllowPrintMovedLineDiff::operator () (StringDiff & linedi
break;
}
}
+ printf("chunk with %d adds and %d deletes\n", adds, deletes);
detectMovedLinesValid = true;
}
return detectMovedLines;
diff --git a/benchmarks/bench.php b/benchmarks/bench.php
index 0aac803..338abde 100644
--- a/benchmarks/bench.php
+++ b/benchmarks/bench.php
@@ -1,7 +1,7 @@
<?php
// Benchmark script for Wikidiff2. It times diffing of 50 changes sampled
// from Special:RecentChanges of several Wikipedias (en, hi, ru, th, and zh).
-$num_loops = 50;
+$num_loops = 1;
$data = json_decode( gzdecode( file_get_contents( __DIR__ . '/revs.json.gz' ) ), true );
echo "loops: " . $num_loops . "\n";