<?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>
    <anon>C#</anon>
    <anon>Unity</anon>
  </categories>
  <description>Spanとは Unity2021でデフォルトで含まれるようになったライブラリで、System.Memoryに含まれる構造体。 source.dot.net 前からDLLを入れれば使ことはできたけども。 何をするためのものか 連続するメモリ領域を読み書きするためのもの。 配列は勿論、stackallocだろうが、マーシャリングしたメモリだろうがSpanとして扱うことができます。 配列をAsSpanしてspanを取得し、spanの値を書き換えると配列にも書き換えが反映されている。つまり、データへの参照を持っています。 C#の大きな欠点として、「配列はなんでもかんでもヒープ」というのがあったと思いま…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnigiri.hatenablog.com%2Fentry%2F2022%2F07%2F25%2F014114&quot; title=&quot;Unity2021で使えるパフォーマンス強化のAPI（要するにSpanなど） - ノートの端の書き残し&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>https://cdn-ak.f.st-hatena.com/images/fotolife/u/u_osusi/20220725/20220725003956.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-07-25 01:41:14</published>
  <title>Unity2021で使えるパフォーマンス強化のAPI（要するにSpanなど）</title>
  <type>rich</type>
  <url>https://nigiri.hatenablog.com/entry/2022/07/25/014114</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
