Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: pkg/kernel/test/uint31_pair_map_bench.dart

Issue 2780513004: [Kernel] Remove code from the old type propagation. (Closed)
Patch Set: Remove empty status file section Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/test/type_propagation_selfcheck.dart ('k') | pkg/kernel/test/uint31_pair_map_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/test/uint31_pair_map_bench.dart
diff --git a/pkg/kernel/test/uint31_pair_map_bench.dart b/pkg/kernel/test/uint31_pair_map_bench.dart
deleted file mode 100644
index 9f732a375dc69adf087dfbca3a69eb99df1b0b7a..0000000000000000000000000000000000000000
--- a/pkg/kernel/test/uint31_pair_map_bench.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-import 'package:kernel/type_propagation/canonicalizer.dart';
-
-main() {
- Stopwatch watch = new Stopwatch()..start();
-
- const int lowBiasKeys = 100;
- const int highBiasKeys = 10000;
- const int noBiasKeys = 1000;
-
- Uint31PairMap map;
-
- // Warm up.
- map = new Uint31PairMap();
- for (int i = 0; i < noBiasKeys; ++i) {
- for (int j = 0; j < noBiasKeys; ++j) {
- map.lookup(i, j);
- map.put(i + j);
- }
- }
-
- // Even distributed tuple components.
- watch.reset();
- map = new Uint31PairMap();
- for (int i = 0; i < noBiasKeys; ++i) {
- for (int j = 0; j < noBiasKeys; ++j) {
- map.lookup(i, j);
- map.put(i + j);
- }
- }
- int noBiasTime = watch.elapsedMicroseconds;
-
- // Left-bias: more unique keys in the first component.
- watch.reset();
- map = new Uint31PairMap();
- for (int i = 0; i < highBiasKeys; ++i) {
- for (int j = 0; j < lowBiasKeys; ++j) {
- map.lookup(i, j);
- map.put(i + j);
- }
- }
- int leftBiasTime = watch.elapsedMicroseconds;
-
- // Right-bias: more unique keys in the second component.
- watch.reset();
- map = new Uint31PairMap();
- for (int i = 0; i < lowBiasKeys; ++i) {
- for (int j = 0; j < highBiasKeys; ++j) {
- map.lookup(i, j);
- map.put(i + j);
- }
- }
- int rightBiasTime = watch.elapsedMicroseconds;
-
- print('''
-bias.none: ${formatTime(noBiasTime)}
-bias.left: ${formatTime(leftBiasTime)}
-bias.right: ${formatTime(rightBiasTime)}
-''');
-}
-
-String formatTime(int microseconds) {
- double seconds = microseconds / 1000000.0;
- return '$seconds s';
-}
« no previous file with comments | « pkg/kernel/test/type_propagation_selfcheck.dart ('k') | pkg/kernel/test/uint31_pair_map_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698