文字列リテラルを使用するたびに、新しい文字列値を作成する必要があります。
問題のケース: fn test = append "A" "B" test() --returns "AB" test() --returns "ABB"
問題のケース:
fn test = append "A" "B" test() --returns "AB" test() --returns "ABB"
テスト ケース: fn test6 v = ()
テスト ケース:
fn test6 v = ()
100,000 回の繰り返しの場合 test6 "A" -- 125 msec. test6 #a -- 16 msec.
100,000 回の繰り返しの場合
test6 "A" -- 125 msec. test6 #a -- 16 msec.
前のヒント
StringStream を使用して巨大文字列を構築する
次のヒント
別の方法がある場合は実行関数を使用しない