addVisitor(new Psalm\Internal\PhpVisitor\CloningVisitor); // performs a deep clone /** @var array */ $a_stmts_copy = $traverser->traverse($a_stmts); $dlt2 = microtime(true); echo 'Partial parsing: cloning: ' . number_format($dlt2 - $dlt, 4) . "\n"; Psalm\Internal\Provider\StatementsProvider::parseStatements($b, null, $a, $a_stmts_copy, $file_changes); $diff_1 = microtime(true) - $time; echo 'Partial parsing: ' . number_format($diff_1, 4) . "\n"; $time = microtime(true); Psalm\Internal\Provider\StatementsProvider::parseStatements($b); $diff_2 = microtime(true) - $time; echo 'Full parsing: ' . number_format($diff_2, 4) . "\n";