<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sz_dr</author_name>
  <author_url>https://blog.hatena.ne.jp/sz_dr/</author_url>
  <blog_title>人間だったら考えて</blog_title>
  <blog_url>https://www.szdrblog.info/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>この記事は何？ Pythonでsetからランダムサンプリングするコードを書いたところ，非常に時間がかかっていたので簡単に計測した時のメモです． 実行環境はPython 3.5.1 (Anaconda 2.5.0)です． 実験条件 サンプリング元はlistおよびsetとし，サイズを10, 100, 1000, 10000, 100000と変えていったときのサンプリングに必要な時間を見ていきます． サンプリングは1000回行うとし，3回実行した時の中央値で評価します． コード コード全体はここにアップロードしてあります． サンプリングの計測関数は以下のようなものです． def sample_tes…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.szdrblog.info%2Fentry%2F2016%2F07%2F23%2F012953&quot; title=&quot;Pythonでsetからランダムサンプリングすると遅い - 人間だったら考えて&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/s/sz_dr/20160723/20160723012051.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-07-23 01:29:53</published>
  <title>Pythonでsetからランダムサンプリングすると遅い</title>
  <type>rich</type>
  <url>https://www.szdrblog.info/entry/2016/07/23/012953</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
