<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiratara</author_name>
  <author_url>https://blog.hatena.ne.jp/hiratara/</author_url>
  <blog_title>Pixel Pedals of Tomakomai</blog_title>
  <blog_url>https://hiratara.hatenadiary.jp/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>複数の条件をすべて満たすときだけ、処理を継続したいということはよくあると思う。例えば以下のようなコード。 fn some_function(x: &amp;Hoge) { if !check0(x) { return; } if !check1(x) { return; } if !check2(x) { return; } if !check3(x) { return; } // x に対する処理 } このとき、 check0 から check3 をどのような順番でチェックするのが一番効率がいいだろう？ 直感的には、一番通りにくいチェックを最初にやっておいたほうが、残りの処理をスキップできて効率がい…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiratara.hatenadiary.jp%2Fentry%2F2021%2F10%2F09%2F154717&quot; title=&quot;条件チェックの順の最適化 - Pixel Pedals of Tomakomai&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>2021-10-09 15:47:17</published>
  <title>条件チェックの順の最適化</title>
  <type>rich</type>
  <url>https://hiratara.hatenadiary.jp/entry/2021/10/09/154717</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
