Optimize parsing large file line-by-line

2022-04-18 Thread LLN13
Ah, yeah. I thought about preallocating but unfortunately it would be difficult to estimate the line length. Thanks for the code! I'm new to the language and this is useful.

Optimize parsing large file line-by-line

2022-04-18 Thread LLN13
I'll try using a tuple. I only used a Table because the Python solution I have uses a dictionary and I wanted to compare the speeds. Thanks!

Optimize parsing large file line-by-line

2022-04-18 Thread LLN13
Hi everyone, I am trying to pass a file (`file.bim`)with 21,283,105 lines line-by-line, apply a filter, and then save the results to a Table and would like to know if my following solution can be optimized further: import std/tables import std/strutils proc parse_bim(b