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:
parent
34b485c0c4
commit
80621fed03
|
@ -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';
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
// Micro-benchmarks for sync/sync*/async/async* functionality.
|
||||
|
||||
// @dart=2.9
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
const int iterationLimitAsync = 200;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
// Macro-benchmark for ffi with boringssl.
|
||||
|
||||
// @dart=2.9
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:ffi';
|
||||
import 'dart:typed_data';
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
// ignore_for_file: camel_case_types
|
||||
|
||||
// @dart=2.9
|
||||
|
||||
import 'dart:ffi';
|
||||
|
||||
/// digest algorithm.
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// @dart=2.9
|
||||
|
||||
void main() {
|
||||
print('Hello, world!');
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// @dart=2.9
|
||||
|
||||
void main() {
|
||||
print('Hello, world!');
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
//
|
||||
// Benchmark for UTF-8 decoding
|
||||
|
||||
// @dart=2.9
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 = '''
|
||||
नेपाल
|
||||
|
||||
|
|
|
@ -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 = '''
|
||||
Литва
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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 = '''
|
||||
最簡單的漢字只有一笔画,但卻不止一個字:除了「一」字以外,「乙」、「〇」、「丶」、「丨」、「亅」、「丿」、「乀」、「乁」、「𠄌」、「𠃋」、「𠃉」、「𠃊」、「乚」等都是漢字,而且都有各自的讀音。
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
//
|
||||
// Benchmark for UTF-8 encoding
|
||||
|
||||
// @dart=2.9
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:benchmark_harness/benchmark_harness.dart';
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 = '''
|
||||
नेपाल
|
||||
|
||||
|
|
|
@ -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 = '''
|
||||
Литва
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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 = '''
|
||||
最簡單的漢字只有一笔画,但卻不止一個字:除了「一」字以外,「乙」、「〇」、「丶」、「丨」、「亅」、「丿」、「乀」、「乁」、「𠄌」、「𠃋」、「𠃉」、「𠃊」、「乚」等都是漢字,而且都有各自的讀音。
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user