Improve test_is_newer performance