<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>atsuhiro-me</author_name>
  <author_url>https://blog.hatena.ne.jp/atsuhiro-me/</author_url>
  <blog_title>みーのぺーじ</blog_title>
  <blog_url>https://pc.atsuhiro-me.net/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>Python で複数の要素から特定のものが存在するかを検索する場合の，効率がよい方法を検討します． 課題 10万個の要素から特定の要素が存在するかどうかを返す． set を使用する方法， list を使用する方法をすぐに思いつきます．list を set に変換してから検索してもよいかもしれません．速度を比較してみましょう． ベンチマーク import math from benchmarker import Benchmarker with Benchmarker(loop=1000, cycle=1, width=20) as bench: n = 100 * 1000 target = …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpc.atsuhiro-me.net%2Fentry%2F2023%2F12%2F25%2F153434&quot; title=&quot;Python で要素の検索速度の比較 - みーのぺーじ&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>2023-12-25 15:34:34</published>
  <title>Python で要素の検索速度の比較</title>
  <type>rich</type>
  <url>https://pc.atsuhiro-me.net/entry/2023/12/25/153434</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
