<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>imasahiro</author_name>
  <author_url>https://blog.hatena.ne.jp/imasahiro/</author_url>
  <blog_title>開発日記</blog_title>
  <blog_url>https://imasahiro.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Ruby言語の正規表現エンジンとしても使われているOnigmo(鬼雲)を高速化したのでその話をします。 Onigmoでは、正規表現のマッチにはバイトコードインタプリタを用いてNFAの実行をしています。バイトコードインタプリタの高速化には古くから知られている技法として、direct threaded codeがあり、この技法を用いればswitch-caseを用いて実装されたインタプリタと比べると間接jumpの除去が行えるなど高速化が期待できます。実際、Onigmoでもswitch-case によるdispatchからこのdirect threaded codeに変えることで高速化しています。 k…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fimasahiro.hatenablog.com%2Fentry%2F2021%2F10%2F18%2F103205&quot; title=&quot;Onigmoのインタプリタをdirect threaded codeに置き換えてCRubyを8%高速化した話 - 開発日記&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>2021-10-18 10:32:05</published>
  <title>Onigmoのインタプリタをdirect threaded codeに置き換えてCRubyを8%高速化した話</title>
  <type>rich</type>
  <url>https://imasahiro.hatenablog.com/entry/2021/10/18/103205</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
