What's the best method of splitting a string - Performance

 
Hello,

Example string: abc;def;ghi

Imagine a function that runs 1000 times, what would be the most efficient way to split this string and get its values, given that this would be done on every iteration?
 
Documentation on MQL5: String Functions / StringSplit
Documentation on MQL5: String Functions / StringSplit
  • www.mql5.com
StringSplit - String Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Ha-yun: given that this would be done on every iteration?
  1. Why every iteration? What is changing?

    Don't worry about performance, until you have a problem. Then, and only then, use the profiler, find the problem, fix the problem, and remeasure.

  2. With a single character separator: StringSplit.

    Otherwise: How to split a string with another string - general - MQL5 programming forum #3 (2020)

Reason: