Topic: Efficient looping?
I've got a situation where I need to loop through a fairly large dataset (250 or so) for matches on two criteria ie x =5 and y = 9. I have been doing this with .detect in a loop and I tried a manually constructed loop, both seem around the same speed. Is there any particularly efficient looping technique Ruby-wise?
I looked at deleting the each element after it was used (they only need to be accessed once) but it didn't seem to noticeably affect speed not could I find a particularly straightforward way of doing it. Ideas?