[perf] Use print() function in both Python 2 and Python 3
Legacy print
statements are syntax errors in Python 3 but print()
function works as expected in both Python 2 and Python 3.
Also, cmp()
was removed in Python 3. https://portingguide.readthedocs.io/en/latest/comparisons.html