<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Gemma</author_name>
  <author_url>https://blog.hatena.ne.jp/Gemma/</author_url>
  <blog_title>Gemmaの日記</blog_title>
  <blog_url>https://gemma.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>Haskellなどで人気の1行エラトステネスの篩は、アルゴリズム本来の計算量より遅いらしい。 sieve (p : xs) = p : sieve [x | x &lt;- xs, x ‘mod‘ p &gt; 0] LtU:The Genuine Sieve of Eratosthenes Wikipedia:en:Sieve of Eratosthenes それを受けて、LtUで以下の速いHaskellコードがあった。 primes = 2 : xor [3..] (composites primes) composites (p:ps) = cs where cs = (p*p) : xor (ma…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgemma.hatenadiary.org%2Fentry%2F20090420%2F1240260347&quot; title=&quot; Gaucheでエラトステネスの篩で素数ストリーム(世間一般のやつより速い) - Gemmaの日記&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-04-20 05:45:47</published>
  <title> Gaucheでエラトステネスの篩で素数ストリーム(世間一般のやつより速い)</title>
  <type>rich</type>
  <url>https://gemma.hatenadiary.org/entry/20090420/1240260347</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
