<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yoshitaku_jp</author_name>
  <author_url>https://blog.hatena.ne.jp/yoshitaku_jp/</author_url>
  <blog_title>よしたく blog</blog_title>
  <blog_url>https://yoshitaku-jp.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>Jupyter Notebook</anon>
  </categories>
  <description>Jupyte Notebook でコードの速度を計測する方法にマジックコマンドとして用意されている、timeと timeitを使う方法がある。 この 2 つの存在は知っていたが、 time と timeit で何が違うのか %の数が 1 つのときと 2 つのときで何が違うのか がわからなかったので、確認してみた！ %time と %%time %time %time は 1 行毎の処理時間を 1 回計測する。 例で上げたコードは、ループの中で%timeを使っているので、出力結果には 10 回分の結果が表示されている。 dist = [] for i in range(10): %time di…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyoshitaku-jp.hatenablog.com%2Fentry%2F2022%2F07%2F23%2F130000&quot; title=&quot;Jupyter Notebookでコードの速度を計測するtimeとtimeit - よしたく blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/y/yoshitaku_jp/20220723/20220723121027.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-07-23 13:00:00</published>
  <title>Jupyter Notebookでコードの速度を計測するtimeとtimeit</title>
  <type>rich</type>
  <url>https://yoshitaku-jp.hatenablog.com/entry/2022/07/23/130000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
