<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Watson</author_name>
  <author_url>https://blog.hatena.ne.jp/Watson/</author_url>
  <blog_title>@watson1978 の日記</blog_title>
  <blog_url>https://watson.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>FFI を利用して C のライブラリを呼び出す時のオーバーヘッドがどれくらいなのかと思い調べてみました。 使用したコード 呼び出し時のオーバーヘッドを知りたかったので、処理負荷がかからない単純に加算するだけのコードとしました。 int add(int x, int y) { return x + y; } 使用したコード一式は https://github.com/Watson1978/ffi-benchmark にあるので、興味がある方はそちらを参照ください。macOS 上でしか試してないので、他の環境だと動かないかもしれません。あしからず。 環境 macOS 13.1 Apple M1 M…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwatson.hatenablog.com%2Fentry%2F2022%2F12%2F31%2F075638&quot; title=&quot;Ruby の FFI によるメソッド呼び出しのオーバーヘッド - @watson1978 の日記&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>2022-12-31 07:56:38</published>
  <title>Ruby の FFI によるメソッド呼び出しのオーバーヘッド</title>
  <type>rich</type>
  <url>https://watson.hatenablog.com/entry/2022/12/31/075638</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
