| Index: runtime/lib/byte_array.dart
|
| diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
|
| index a6efae205473d075a9ed794c0464b41f25f6a40b..0897917bb0d6396229e1897b9c53fe84e5209ca7 100644
|
| --- a/runtime/lib/byte_array.dart
|
| +++ b/runtime/lib/byte_array.dart
|
| @@ -131,7 +131,9 @@ abstract class _ByteArrayBase {
|
| }
|
|
|
| Collection map(f(element)) {
|
| - return Collections.map(this, new List(), f);
|
| + return Collections.map(this,
|
| + new GrowableObjectArray.withCapacity(length),
|
| + f);
|
| }
|
|
|
| Dynamic reduce(Dynamic initialValue,
|
| @@ -140,7 +142,7 @@ abstract class _ByteArrayBase {
|
| }
|
|
|
| Collection filter(bool f(element)) {
|
| - return Collections.filter(this, new List(), f);
|
| + return Collections.filter(this, new GrowableObjectArray(), f);
|
| }
|
|
|
| bool every(bool f(element)) {
|
| @@ -1608,7 +1610,9 @@ class _ByteArrayViewBase {
|
| }
|
|
|
| Collection map(f(element)) {
|
| - return Collections.map(this, new List(), f);
|
| + return Collections.map(this,
|
| + new GrowableObjectArray.withCapacity(length),
|
| + f);
|
| }
|
|
|
| Dynamic reduce(Dynamic initialValue,
|
| @@ -1617,7 +1621,7 @@ class _ByteArrayViewBase {
|
| }
|
|
|
| Collection filter(bool f(element)) {
|
| - return Collections.filter(this, new List(), f);
|
| + return Collections.filter(this, new GrowableObjectArray(), f);
|
| }
|
|
|
| bool every(bool f(element)) {
|
|
|