<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>KZR</author_name>
  <author_url>https://blog.hatena.ne.jp/KZR/</author_url>
  <blog_title>Radium Software</blog_title>
  <blog_url>https://kzr-2.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>個人的にC#はグルー言語であるという認識が強くて、パフォーマンスを意識したプログラミングの経験が無い。しかしUnityのスクリプトをC#で書いていると、そこを意識しなくてはならないケースに出くわすことがある。最近あったのは、テンポラリな配列のアロケーションが大きなオーバーヘッドを生み出しているという状況だった。これは結局、配列の使用をやめてstructのメンバー変数にパックするよう変更したところ、パフォーマンスは著しく改善された。言い換えれば、テンポラリオブジェクトの所在をヒープ上からスタック上へと移すことによってオーバーヘッドが解消された、という格好だ。問題となっていたのは、まあざっくりとこ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkzr-2.hatenadiary.org%2Fentry%2F20101130%2Fp1&quot; title=&quot;C#におけるヒープVSスタック問題、あるいはUnityにおけるスクリプト高速化。 - Radium Software&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>2010-11-30 00:00:00</published>
  <title>C#におけるヒープVSスタック問題、あるいはUnityにおけるスクリプト高速化。</title>
  <type>rich</type>
  <url>https://kzr-2.hatenadiary.org/entry/20101130/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
