With Python’s built-in timeit module, you can measure the performance of your functions or lines of code in one easy step By design, Python puts convenience, readability, and ease of use ahead of ...
何年も前、友人から Python の関数の処理時間を計測する @timeit というデコレータを教えてもらったのですが、詳細を忘れてしまいました。 timeit は、Python の標準ライブラリにあり、Python コードの実行時間を計測できますがデコレータではありません。