Python is too slow