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
初心者の方には必見の記事です。
私たちが無知でなくなるように、あなたを疲れさせるのはいいことだ。
文字列に桁グループの区切り文字を追加する:
//---
結果
文字列に桁区切り文字を追加する:
ちょっと複雑なんだ。
最適化を図るのか?
すごいね!しかも4倍速い:
//---