Python2のコードを高速化するための覚書

実行時間の測定方法 CPythonでpythonの素のコードを実行するとヤバイぐらいに時間がかかる。実際にどのぐらいかかるのかを調べる。 import time def main(): start = time.time() hoge() elapsed_time = time.time() - start まあこれでもよいのだが、 python -m cProfile -c totaltime hoge.py 以上を実行すれば、それぞ…