Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
load and assign 3MB, 70,000 lines txt to array in a minute?
#2
Place minus before i, and the time will be 120 milliseconds. From getl help: "If n is omitted or negative, finds next line. It is much more effective, than to use growing n every time.". Because, when positive line number is specified, getl searches for n-th line from the beginning of the string, 70000 times in 3 MB. If line number is omitted or negative (any negative number), getl remembers previous line in that string, and searches from that place, not from the beginning.


lines[i].getl(data -i)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)