1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-01 07:14:29 +00:00

[benchmark] Add language version comments to benchmarks.

Change-Id: I44047a9d7907d166a6360397d0047ce9b835e5c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166854
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
This commit is contained in:
Jonas Termansen 2020-10-13 01:43:22 +00:00 committed by commit-bot@chromium.org
parent 34b485c0c4
commit 80621fed03
49 changed files with 99 additions and 0 deletions

View File

@ -4,6 +4,8 @@
// ignore_for_file: avoid_function_literals_in_foreach_calls
// @dart=2.9
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:fixnum/fixnum.dart';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
abstract class NativeBigIntMethods {
bool get enabled;

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'native_version.dart';
const NativeBigIntMethods nativeBigInt = _DummyMethods();

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
@JS()
library native_version_javascript;

View File

@ -4,6 +4,8 @@
// Micro-benchmarks for sync/sync*/async/async* functionality.
// @dart=2.9
import 'dart:async';
const int iterationLimitAsync = 200;

View File

@ -8,6 +8,8 @@
// similarly defined functions and closures except that the parameters and
// return types are all dynamic.
// @dart=2.9
import 'package:benchmark_harness/benchmark_harness.dart';
const int kRepeat = 100;

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:isolate';
import 'json_benchmark.dart';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:math';
import 'dart:convert';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:async';
import 'dart:io';
import 'dart:math' as math;

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'package:benchmark_harness/benchmark_harness.dart';
class Example extends BenchmarkBase {

View File

@ -4,6 +4,8 @@
// Macro-benchmark for ffi with boringssl.
// @dart=2.9
import 'dart:convert';
import 'dart:ffi';
import 'dart:typed_data';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:ffi';
import 'dart:io';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:ffi';
import 'dart:io';

View File

@ -4,6 +4,8 @@
// ignore_for_file: camel_case_types
// @dart=2.9
import 'dart:ffi';
/// digest algorithm.

View File

@ -7,6 +7,8 @@
// These micro benchmarks track the speed of reading and writing C memory from
// Dart with a specific marshalling and unmarshalling of data.
// @dart=2.9
import 'dart:ffi';
import 'dart:io';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:ffi';
import 'dart:io';

View File

@ -9,6 +9,8 @@
// These micro benchmarks track the speed of reading and writing C memory from
// Dart with a specific marshalling and unmarshalling of data.
// @dart=2.9
import 'dart:ffi';
import 'package:ffi/ffi.dart';

View File

@ -7,6 +7,8 @@
// Only tests a single field because the FfiMemory benchmark already tests loads
// and stores of different field sizes.
// @dart=2.9
import 'dart:ffi';
import 'package:ffi/ffi.dart';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:async';
import 'dart:isolate';
import 'dart:typed_data';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:async';
import 'dart:convert';
import 'dart:io';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:async';
import 'dart:isolate';
import 'dart:math';

View File

@ -1,3 +1,5 @@
// @dart=2.9
void main() {
print('Hello, world!');
}

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:async';
import 'dart:developer';
import 'dart:io';

View File

@ -1,3 +1,5 @@
// @dart=2.9
void main() {
print('Hello, world!');
}

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:collection';
import 'dart:typed_data';
import 'package:benchmark_harness/benchmark_harness.dart';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';

View File

@ -7,6 +7,8 @@
// ignore_for_file: prefer_const_constructors
// ignore_for_file: avoid_function_literals_in_foreach_calls
// @dart=2.9
import 'dart:typed_data';
import 'package:benchmark_harness/benchmark_harness.dart';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'package:benchmark_harness/benchmark_harness.dart';
import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';

View File

@ -5,6 +5,8 @@
/// A Dart implementation of two computation kernels used for skeletal
/// animation.
// @dart=2.9
import 'dart:typed_data';
import 'package:benchmark_harness/benchmark_harness.dart';

View File

@ -5,6 +5,8 @@
/// A Dart implementation of two computation kernels used for skeletal
/// animation. SIMD version.
// @dart=2.9
import 'dart:typed_data';
import 'package:benchmark_harness/benchmark_harness.dart';

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:collection';
import 'dart:typed_data';

View File

@ -1,5 +1,8 @@
/// Marker interface for [Iterable] subclasses that have an efficient
/// [length] implementation.
// @dart=2.9
abstract class EfficientLengthIterable<T> extends Iterable<T> {
const EfficientLengthIterable();

View File

@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'dart:collection';
import 'iterable.dart';

View File

@ -4,6 +4,8 @@
// Micro-benchmarks for copying typed data lists.
// @dart=2.9
import 'dart:typed_data';
import 'package:benchmark_harness/benchmark_harness.dart';

View File

@ -4,6 +4,8 @@
//
// Benchmark for UTF-8 decoding
// @dart=2.9
import 'dart:convert';
import 'dart:typed_data';

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String da = '''
Anders And

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String en = '''
Anarchism

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String ne = '''

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String ru = '''
Литва

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String sk = '''
Esperanto (pôvodne Lingvo Internacia medzinárodný jazyk) je najrozšírenejší medzinárodný plánový jazyk. Názov je odvodený od pseudonymu, pod ktorým v roku 1887 zverejnil lekár L. L. Zamenhof základy tohto jazyka. Zámerom tvorcu bolo vytvoriť ľahko naučiteľný a použiteľný neutrálny jazyk, vhodný na použitie v medzinárodnej komunikácii. Cieľom nebolo nahradiť národné jazyky, čo bolo neskôr aj deklarované v Boulonskej deklarácii.

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String zh = '''
丿𠄌𠃋𠃉𠃊

View File

@ -4,6 +4,8 @@
//
// Benchmark for UTF-8 encoding
// @dart=2.9
import 'dart:convert';
import 'package:benchmark_harness/benchmark_harness.dart';

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String da = '''
Anders And

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String en = '''
Anarchism

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String ne = '''

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String ru = '''
Литва

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String sk = '''
Esperanto (pôvodne Lingvo Internacia medzinárodný jazyk) je najrozšírenejší medzinárodný plánový jazyk. Názov je odvodený od pseudonymu, pod ktorým v roku 1887 zverejnil lekár L. L. Zamenhof základy tohto jazyka. Zámerom tvorcu bolo vytvoriť ľahko naučiteľný a použiteľný neutrálny jazyk, vhodný na použitie v medzinárodnej komunikácii. Cieľom nebolo nahradiť národné jazyky, čo bolo neskôr aj deklarované v Boulonskej deklarácii.

View File

@ -7,6 +7,8 @@
// The material is licensed under the Creative Commons Attribution-Share-Alike
// License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
// @dart=2.9
const String zh = '''
丿𠄌𠃋𠃉𠃊