in reply to Re: Faster and more efficient way to read a file vertically
in thread Faster and more efficient way to read a file vertically

FWIW, seek was my first thought, too. (Also that I'd prototype in Perl, then write the same thing in C. I might've found my weekend project... :) I can't imagine that allocating memory is going to help (I like when my imagination is challenged, though). I think at least if we can assume the file is in filesystem cache the read will be coming from RAM already anyway.
  • Comment on Re^2: Faster and more efficient way to read a file vertically

Replies are listed 'Best First'.
Re^3: Faster and more efficient way to read a file vertically
by ForgotPasswordAgain (Vicar) on Nov 03, 2017 at 21:12 UTC
    I think this is parallelizable, too. If you have 24 cores, you can seek to $L/24, do your thing, combine results.