Python implementation of hint benchmark