<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>laplus-knsn</author_name>
  <author_url>https://blog.hatena.ne.jp/laplus-knsn/</author_url>
  <blog_title>at kaneshin</blog_title>
  <blog_url>https://kaneshin.hateblo.jp/</blog_url>
  <categories>
    <anon>Golang</anon>
    <anon>Regexp</anon>
  </categories>
  <description>golang の Regexp は初期化の Compile コストがそこそこありますが、実は正規表現のパターンと対象となる文字列によって、初期化コストが無視できる（パターンと文字列に支配される）くらい遅くなります。よく言われる regexp の初期化コスト問題が無視できると言われても、正直、全く嬉しくないですね。 ただ、コーディング中に regexp パッケージを使わなければいけない場面は出てくるため、なるべくコストの掛からない実装を心がけています。 Compile/MustCompile 初期化コストはなくすため、グローバルに保持するようにします。 定義 var re = regexp.Mu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkaneshin.hateblo.jp%2Fentry%2F2016%2F10%2F15%2F132918&quot; title=&quot;golang で regexp パッケージを使うときに気をつけること - at kaneshin&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/l/laplus-knsn/20161015/20161015132839.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-10-15 13:29:18</published>
  <title>golang で regexp パッケージを使うときに気をつけること</title>
  <type>rich</type>
  <url>https://kaneshin.hateblo.jp/entry/2016/10/15/132918</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
