Skip to content

Commit

Permalink
Switch from LinkedHashMap to HashMap.
Browse files Browse the repository at this point in the history
This speeds up the Dart VM by 40% but has no effect for dart2js.

BUG=
[email protected]

Review URL: https://chromiumcodereview.appspot.com//1331293003.
  • Loading branch information
Brian Slesinsky committed Sep 11, 2015
1 parent 24ffa4f commit bb95a73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/protobuf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
library protobuf;

import 'dart:async' show Future;
import 'dart:collection' show ListMixin;
import 'dart:collection' show HashMap, ListMixin;
import 'dart:convert' show JSON, Utf8Codec;
import 'dart:math' as math;
import 'dart:typed_data' show TypedData, Uint8List, ByteData, Endianness;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/protobuf/generated_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ abstract class GeneratedMessage {
static Int64 MAX_JSON_INT = new Int64.fromInts(0x200000, 0);
static Int64 MIN_JSON_INT = -MAX_JSON_INT;

final Map<int, dynamic> _fieldValues = new Map<int, dynamic>();
final Map<int, dynamic> _fieldValues = new HashMap<int, dynamic>();

Map<int, Extension> __extensions;
Map<int, Extension> get _extensions {
if (__extensions == null) __extensions = new Map<int, Extension>();
if (__extensions == null) __extensions = new HashMap<int, Extension>();
return __extensions;
}

Expand Down

0 comments on commit bb95a73

Please sign in to comment.