Re:When your data doesn’t fit in memory: the basic techniques
by lorenzhs on Tuesday November 12, 2019 @04:45AM
(#21512847)
Uh, that's what the theory people do, too. We make assumptions about the model, for example, that if our input is of size n, a machine word should be able to store that number (word size θ(log n) bits). Otherwise we'd never get anywhere with asymptotic analysis.
In my experience, practitioners just have a lot of misconceptions about "Big O".
So integers count as constant memory AND can be considered to be arbitrarily large for the purpose of the current problem. Because having more than 2^64 lines in a file will never happen in practice, and even if it does then 2 integers would do the job for the rest of the observable universe.
Be pragmatic, you are on Hacker News.