<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>u_osusi</author_name>
  <author_url>https://blog.hatena.ne.jp/u_osusi/</author_url>
  <blog_title>ノートの端の書き残し</blog_title>
  <blog_url>https://nigiri.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Dictionary&lt;string,T&gt; vs. (string, T)[] 文字列をキーにして何らかの値を保持しており、値の検索を行いたいという、まぁまぁありそうなケースを考えます。 配列の検索はO(n)、DictionaryはO(1)なので、Dictionaryの方がO記法では有利ですが、要素数が多ければ有利という話でしかありません。 要素数が少ない場合を実際に見てみましょう。 github.com 計測には一般的な手法としてBenchmarkDotNetを使用します。 internal class Program { private static void Main(string[] a…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnigiri.hatenablog.com%2Fentry%2F2024%2F08%2F16%2F205136&quot; title=&quot;【初心者】O記法に縛られず、具体例を計測して現実的なデータに合わせようという話 - ノートの端の書き残し&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>2024-08-16 20:51:36</published>
  <title>【初心者】O記法に縛られず、具体例を計測して現実的なデータに合わせようという話</title>
  <type>rich</type>
  <url>https://nigiri.hatenablog.com/entry/2024/08/16/205136</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
