From: Robert Klemme Date: 2012-05-26T04:55:28+09:00 Subject: Re: Memory-efficient set of Fixnums Hi George, On Thu, May 24, 2012 at 7:34 PM, George Dupre wrote: > Sorry, I should have given more details. While I am doing this is an > academic setting, it isn't homework in the traditional sense. This is > part of my "personal initiative project", reaching outside of my field > of studies (math and physics) but with outside help allowed. It revolves > around a Korean 4x4 board game, which I am currently trying to solve > through brute force, hence the ridiculous requirements. Each possible > position of the board is matched to an integer. An error of zero is > imperative, but using 512 MB of RAM isn't an issue at all: I only need > to run that calculation once, in a reasonable time. I will also look > into this google_hash gem, it should also be useful. > > Thank you once again for your help. I advanced the implementation a bit - now it doesn't choke as easily because of the single large String - there are #clear and #empty? methods - resetting is more efficient - there is Enumerable functionality https://gist.github.com/2775600 Have fun! Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/