OpenRA/OpenRA — pull request #7091 by RoosterDragon (2014-12-07 21:06:20+00:00)
Title: Block copy palettes

In HardwarePalettes.ApplyModifiers, we achieve a 2x speedup (reducing overall time spent in this method from 4.3% to 2.2%) by block copying the palettes.

Since palettes are internally implemented as arrays, a CopyToArray method has been added to allow palettes to be block copied. This makes copy operations 10x faster, meaning they now consume only 0.2% of overall time instead of 2.2%.