Yelp/gh-unit — pull request #2 by bashery (2013-09-28 05:03:05+00:00)
Title: Faster Image Comparison

With lots of tests, faster image comparison starts to become really appealing. I was playing around with different ways of doing comparison, and here are the results. These results show just across 2 runs for our test suite the fastest and slowest image comparison times in the format "min - max":

Current Way
0.000530 - 0.442715
0.000532 - 0.458031

Using memcmp
0.000251 - 0.057339
0.000269 - 0.056613

Comparing [UIImagePNGRepresentation(image) base64Encoding] strings
0.000890 - 0.223095
0.000812 - 0.224019

Memcmp is fast, and the comparison still works just fine.