in reply to fast way of working with numerical positions

I don't believe we can offer you an efficient solution based on that scant information, without asking a few questions:


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: fast way of working with numerical positions

Replies are listed 'Best First'.
Re^2: fast way of working with numerical positions
by Anonymous Monk on Apr 27, 2011 at 18:24 UTC
    more information:

    positions are integers; there are millions of single positions; there are millions of lines; the length of the lines is typically in the 1000s

    I have tried this in a database with judicious use of joins. I'm happy to stick with the database but i thought due to the large numbers involved there might be a quicker solution in perl.

      You've omitted the overall range.

      A very efficient solution for a total range of 0 .. 100,000, becomes impractical for a range of 0 .. 4 billion.

      I'm happy to stick with the database

      'nuff said. You have your solution.

      but i thought due to the large numbers involved there might be a quicker solution in perl.

      There quite probably is, but if what you have is good enough, why expend the effort?


      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.