What is the fastest way to Parse a line in Delphi?

前端 未结 9 1899
深忆病人
深忆病人 2020-12-13 01:18

I have a huge file that I must parse line by line. Speed is of the essence.

Example of a line:

Token-1   Here-is-the-Next-Token      La         


        
9条回答
  •  时光说笑
    2020-12-13 01:37

    This begs another question - How big? Give us a clue like # of lines or # or Mb (Gb)? Then we will know if it fits in memory, needs to be disk based etc.

    At first pass I would use my WordList(S: String; AList: TStringlist);

    then you can access each token as Alist[n]... or sort them or whatever.

提交回复
热议问题