<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hacchi_man</author_name>
  <author_url>https://blog.hatena.ne.jp/hacchi_man/</author_url>
  <blog_title>うにてぃブログ</blog_title>
  <blog_url>https://hacchi-man.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>Profiler</anon>
  </categories>
  <description>enum を int にキャストするときには (int)enum と enum.GetHashCode() の2つがある（はず） しかしながらどちらが早いのか、int をそのまま扱うのと比べてどれくらい遅いのかを調べたことがなかったので調べてみる Unity Editor 上 で .NET 4.x にして Profiler を利用して計測する 何度もやったわけではないので、これが正しいと限らないのでご了承ください 計測 // ループは10万回 var loop = 100000; // 1. int をそのまま var sum1 = 0; for (var i = 0; i &lt; loop; i…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhacchi-man.hatenablog.com%2Fentry%2F2021%2F02%2F16%2F220000&quot; title=&quot;【Unity】Enum の int キャストについて調べてみた - うにてぃブログ&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-02-16 22:00:00</published>
  <title>【Unity】Enum の int キャストについて調べてみた</title>
  <type>rich</type>
  <url>https://hacchi-man.hatenablog.com/entry/2021/02/16/220000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
