OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 #library("BenchmarkTests"); | 6 #library("BenchmarkTests"); |
| 7 #import("dart:math", prefix: "Math"); |
7 #import("../../../lib/utf/utf.dart", prefix: "SE"); | 8 #import("../../../lib/utf/utf.dart", prefix: "SE"); |
8 #source("benchmark_runner.dart"); | 9 #source("benchmark_runner.dart"); |
9 | 10 |
10 void main() { | 11 void main() { |
11 | 12 |
12 final List<int> testEnglishUtf8 = const<int> [ | 13 final List<int> testEnglishUtf8 = const<int> [ |
13 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, | 14 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, |
14 0x6b, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x6e, 0x20, | 15 0x6b, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x6e, 0x20, |
15 0x66, 0x6f, 0x78, 0x20, 0x6a, 0x75, 0x6d, 0x70, | 16 0x66, 0x6f, 0x78, 0x20, 0x6a, 0x75, 0x6d, 0x70, |
16 0x73, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x74, | 17 0x73, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x74, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 116 |
116 BenchmarkRunner.runTimed("SE_EL1","string_encoding/decodeUtf8-Greek", | 117 BenchmarkRunner.runTimed("SE_EL1","string_encoding/decodeUtf8-Greek", |
117 testConfig_1sec, () => | 118 testConfig_1sec, () => |
118 (new SE.Utf8Decoder(testGreekUtf8)).decodeRest()); | 119 (new SE.Utf8Decoder(testGreekUtf8)).decodeRest()); |
119 | 120 |
120 BenchmarkRunner.runTimed("SE_JA1","string_encoding/decodeUtf8-Katakana", | 121 BenchmarkRunner.runTimed("SE_JA1","string_encoding/decodeUtf8-Katakana", |
121 testConfig_1sec, () => | 122 testConfig_1sec, () => |
122 (new SE.Utf8Decoder(testKatakanaUtf8)).decodeRest()); | 123 (new SE.Utf8Decoder(testKatakanaUtf8)).decodeRest()); |
123 } | 124 } |
124 | 125 |
OLD | NEW |