Different performance test in python