<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nurse</author_name>
  <author_url>https://blog.hatena.ne.jp/nurse/</author_url>
  <blog_title>なるせにっき</blog_title>
  <blog_url>https://naruse.hateblo.jp/</blog_url>
  <categories>
    <anon>prog</anon>
  </categories>
  <description>ASCII Compatible な encoding の文字列に、ASCII 文字以外が含まれているかどうか検索するという問題。Ruby においては ASCII のみの文字列は ASCII 互換 encoding の文字列と結合できるので重要な問題です。普通に書くと以下のようになるでしょうか。しかし、これでは 1000 文字を 100 万回調べるのに 160 秒ほどかかってしまいました。 int search_nonascii_bytes(const char* p, const char *e) { for (; p &lt; e; ++p) { if (!isascii(*p)) return…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnaruse.hateblo.jp%2Fentry%2F20080321%2F1206091901&quot; title=&quot;Search Non ASCII with bytes - なるせにっき&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>2008-03-21 18:31:41</published>
  <title>Search Non ASCII with bytes</title>
  <type>rich</type>
  <url>https://naruse.hateblo.jp/entry/20080321/1206091901</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
