From: Joseph McDonald Date: 2002-07-01T00:50:41+09:00 Subject: Re: select loop question NF> Just do NF> answer[0].each {|r| readfds.delete(r)} Thanks, I do notice that Array.delete seems to be very slow, If I run this: hits = (200..300).to_a 1.upto(1000) do arr = [] 1.upto(500) do |x| arr.push(x) end # hits.each do |h| # arr.delete(h) # end end I get: 0.47 real 0.46 user 0.00 sys If I uncomment out the delete portion I get: 8.74 real 8.23 user 0.00 sys My guess is that it is doing the cartesion product thing, interesting that it is 8 times slower than: arr.each do |x| if x >= 200 and x <= 300 arr.slice!(x) end end which gives: 1.09 real 1.06 user 0.00 sys another surprising thing, if I use: arr = arr - hits gives: 24.36 real 21.91 user 0.03 sys thanks, -joe