LoginSignup
1
1

More than 5 years have passed since last update.

ContiguousArray

Posted at

意訳です。

  • ContiguousArrayはメモリの連続した領域に要素を格納する特殊な配列。

  • これはArrayが要素の型がクラスか@objcプロトコルの時にメモリの連続領域かNSArrayインスタンスのどちらかに要素を格納するのと対照的である。

  • もし、使用する配列の要素の型がクラスか@objcプロトコルで、NSArrayへのブリッジやObjective-CのAPIへ渡す必要がない場合、ContiguousArrayを用いることはArrayより効率的でより予測可能なパフォーマンスがあがるだろう。

  • 要素の型が構造体かenumの時は、ArrayとContiguousArrayは同じ効率である。ContiguousArrayはほとんどのプロパティとメソッドをそれらと共有しているので配列を用い方の詳しい情報はArray,ArraySliceを参照すること。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1