| Index: src/array.js
|
| diff --git a/src/array.js b/src/array.js
|
| index df080a76992925fd7961de1d241d11c47995828f..6cf417874da2924caf1477be658cefb408bfc3bc 100644
|
| --- a/src/array.js
|
| +++ b/src/array.js
|
| @@ -631,7 +631,9 @@ function ArraySlice(start, end) {
|
|
|
| if (end_i < start_i) return result;
|
|
|
| - if (IS_ARRAY(this)) {
|
| + if (IS_ARRAY(this) &&
|
| + (end_i > 1000) &&
|
| + (%EstimateNumberOfElements(this) < end_i)) {
|
| SmartSlice(this, start_i, end_i - start_i, len, result);
|
| } else {
|
| SimpleSlice(this, start_i, end_i - start_i, len, result);
|
|
|