Index: src/js/array.js |
diff --git a/src/js/array.js b/src/js/array.js |
index b8cf3ff5d222a3fb65266a9539890b218b1b30d4..28d964eaae87a36e05585a8755938a5fb3feb0d0 100644 |
--- a/src/js/array.js |
+++ b/src/js/array.js |
@@ -209,6 +209,8 @@ |
elements[elements_length++] = e; |
} |
elements.length = elements_length; |
+ var result = %_FastOneByteArrayJoin(elements, ''); |
+ if (!IS_UNDEFINED(result)) return result; |
return %StringBuilderConcat(elements, elements_length, ''); |
} |
// Non-empty separator case. |
@@ -231,6 +233,9 @@ |
elements[i] = e; |
} |
} |
+ var result = %_FastOneByteArrayJoin(elements, separator); |
+ if (!IS_UNDEFINED(result)) return result; |
+ |
return %StringBuilderJoin(elements, length, separator); |
} finally { |
// Make sure to remove the last element of the visited array no |
@@ -441,6 +446,9 @@ |
} else { |
separator = TO_STRING(separator); |
} |
+ |
+ var result = %_FastOneByteArrayJoin(array, separator); |
+ if (!IS_UNDEFINED(result)) return result; |
// Fast case for one-element arrays. |
if (length === 1) { |