RubyFlow The Ruby and Rails community linklog

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.

Continue reading

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in