I have a program that will store many instances of one class, let\'s say up to 10.000 or more. The class instances have several properties that I need from time to time, but
Ruby has a set class in its standard library, have you considering keeping an (additional) set of IDs only?
http://stdlib.rubyonrails.org/libdoc/set/rdoc/index.html
To quote the docs: "This is a hybrid of Array’s intuitive inter-operation facilities and Hash’s fast lookup".