Arrays and Linked Lists in Ruby
Matz has done a lot of magic in MRI to make arays fast. Rubinius and JRuby do even more, but fast is of course relative in Ruby. Another thing to consider with arrays is memory.
Say you have an Array with 10,000 space ships. These are player ships, and they are structs. I will give you an example definition, but all that you need to consider, is that this a complex object. It’s size can radically change from one element to the next.
Post a comment