diff --git a/prototype/doubt-difftool/main.swift b/prototype/doubt-difftool/main.swift index 623f4cf36..658912982 100644 --- a/prototype/doubt-difftool/main.swift +++ b/prototype/doubt-difftool/main.swift @@ -178,7 +178,8 @@ let parser = parserForType(aSource.type) let a = try benchmark("parsing source a") { try parser(aSource.contents) } let b = try benchmark("parsing source b") { try parser(bSource.contents) } -let diff = benchmark("diffing") { Interpreter(equal: Term.equals(annotation: const(true), leaf: ==), comparable: Interpreter.comparable { $0.extract.categories }, cost: Free.sum(Patch.sum)).run(a, b).flatMap(refineLeafReplacement(aSource.contents, bSource.contents)) } +let initialDiff = benchmark("diffing") { Interpreter(equal: Term.equals(annotation: const(true), leaf: ==), comparable: Interpreter.comparable { $0.extract.categories }, cost: Free.sum(Patch.sum)).run(a, b) } +let diff = benchmark("diffing within leaves") { initialDiff.flatMap(refineLeafReplacement(aSource.contents, bSource.contents)) } switch arguments.output { case .Split: let JSON: Doubt.JSON = [