in reply to Re: search array for closest lower and higher number from another array
in thread search array for closest lower and higher number from another array

What I am trying to do is leverage the speed of grep to complete the task. The data files are huge and I have found that grep is significantly faster than even running the files through an empty Perl loop.

Is grep twice as fast as perl? Because if it isn't making two passes and then a binary search two match the lines numbers, and then a partial third pass to extract the required lines doesn't make sense.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^2: search array for closest lower and higher number from another array