<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mzp</author_name>
  <author_url>https://blog.hatena.ne.jp/mzp/</author_url>
  <blog_title>みずぴー日記</blog_title>
  <blog_url>https://mzp.hatenadiary.org/</blog_url>
  <categories>
    <anon>OCaml</anon>
    <anon>30分プログラム</anon>
  </categories>
  <description>30分プログラム、その585。OCamlのプロファラを試してみよう。 マニュアル曰く、実行したときに何回関数が呼ばれたか、何回条件分岐が行なわれたかを記録できるらしい。どうも、各関数に何秒かかったか、などの情報は取れないらしい。 1.コンパイル とりあえず、適当なコードを書く。 let rec fact = function 0 -&gt; 1 | n -&gt; n * fact (n - 1) let _ = Printf.printf &quot;%d\n&quot; (fact 10) ocamlcpでコンパイル。 $ ls fact.ml $ ocamlcp -o fact fact.ml # factができてる …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmzp.hatenadiary.org%2Fentry%2F20090516%2Focamlprof&quot; title=&quot;OCamlでプロファイリング - みずぴー日記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-05-16 00:00:00</published>
  <title>OCamlでプロファイリング</title>
  <type>rich</type>
  <url>https://mzp.hatenadiary.org/entry/20090516/ocamlprof</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
