From a41841117e4bdc4618d78dbb4847d98a9ecd23ab Mon Sep 17 00:00:00 2001 From: martinahansen Date: Mon, 17 Oct 2011 13:19:07 +0000 Subject: [PATCH] bitarray.rb bits_on method speedup x 3 git-svn-id: http://biopieces.googlecode.com/svn/trunk@1581 74ccb610-7750-0410-82ae-013aeee3265d --- code_ruby/lib/maasha/bitarray.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code_ruby/lib/maasha/bitarray.rb b/code_ruby/lib/maasha/bitarray.rb index 13a50f0..4cb77b4 100644 --- a/code_ruby/lib/maasha/bitarray.rb +++ b/code_ruby/lib/maasha/bitarray.rb @@ -61,8 +61,8 @@ class BitArray def bits_on bits_on = 0 - (0 ... self.byte_array.size).each do |byte| - bits_on += @count_array[self.byte_array[byte]] + self.byte_array.each do |byte| + bits_on += @count_array[byte] end bits_on -- 2.39.5