According to the description of these functions in MQL5 Reference, they allow us to add up strings in a more space efficient (in terms of the occupied working memory) and faster way.
2013.04.11 19:09:48 teststring (EURUSD,M1) time for 'StringConcatenate(c,a,b)' = 1170 milliseconds, i = 1000000 2013.04.11 19:09:47 teststring (EURUSD,M1) time for 'StringAdd(a,b)' = 94 milliseconds, i = 1000000 2013.04.11 19:09:47 teststring (EURUSD,M1) time for 'c = a + b' = 265 milliseconds, i = 1000000
......我个人对行长 限制的问题很感兴趣....。
According to the description of these functions in MQL5 Reference, they allow us to add up strings in a more space efficient (in terms of the occupied working memory) and faster way.
事实上,文档中存在不一致的地方。我不知道内存使用情况,但就更快与否而言,StringConcatenate() 要比 StringAdd 和 + 慢得多。
2013.04.11 19:09:48 teststring (EURUSD,M1) time for 'StringConcatenate(c,a,b)' = 1170 milliseconds, i = 1000000
2013.04.11 19:09:47 teststring (EURUSD,M1) time for 'StringAdd(a,b)' = 94 milliseconds, i = 1000000
2013.04.11 19:09:47 teststring (EURUSD,M1) time for 'c = a + b' = 265 milliseconds, i = 1000000
好文章,初学者必读。
谢谢您的工作
为字符串添加数字组分隔符:
//---
结果:
为字符串添加数字组分隔符:
这有点复杂。
您会尝试优化它吗?
太棒了速度快了四倍
//---