update benchmark code for python 3
better types