> [https://nim-lang.org/docs/sharedtables.html](https://nim-lang.org/docs/sharedtables.html)

Thank you, I never noticed it. I love Nim's stdlib!

> What would be faster is to read from the file line-by-line.

I always thought calling read() over and over again is fairly expensive. That 
said I wouldn't know better, I'm just a beginner programmer. In my test case, 
for this input: 
[https://gist.githubusercontent.com/cosmologicon/beadf49c9fe50a5c2a07ab8d68093bd0/raw/fb5af1a744faf79d64e2a3bb10973e642dc6f7b0/yahtzee-upper-1.txt](https://gist.githubusercontent.com/cosmologicon/beadf49c9fe50a5c2a07ab8d68093bd0/raw/fb5af1a744faf79d64e2a3bb10973e642dc6f7b0/yahtzee-upper-1.txt)
 which contains a billion lines of texts, reading the entire file seems 
marginally faster. 

Reply via email to