Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by commandlinefan

5 months ago

> Dump whole file into buffer as one string

... unless the file is too big to fit into memory?

1 comment

commandlinefan

Reply

writebetterc  5 months ago

Memory will always be the limiting factor here. A strong adversary can ensure that you must know the whole list in order to sort it.

You can always mmap the file instead and let the OS page in and out parts of the file, however :-).

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities