| commit | 59f19d87711d8d1300dce5e27dd79e61b3de36d3 | [log] [tgz] |
|---|---|---|
| author | Jens Johansen <jensj@google.com> | Thu Jul 31 00:41:03 2025 -0700 |
| committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Jul 31 00:41:03 2025 -0700 |
| tree | 82452c59446d3d96a3e4c0d82b7e98ae565db69d | |
| parent | d73f7bdb4366b447eb9874fe80381b8efd03c718 [diff] |
[parser] Shortcut common case in parseArgumentsRest Observation: Often when about to call parseExpression in parseArgumentsRest we see either "<identifier> <comma>" (say, we're passing a variable) or "<identifier> <end parens>" (same case, but last argument). This CL allows us to shortcut such cases avoiding a lot of calls where we check if it's other cases which it isn't. pkg/analyzer/lib/src/dart/ast/ast.dart: JIT (tokens per microsecond): 5.5605% +/- 4.0086% (1.16 +/- 0.84) (20.94 -> 22.10) AOT (tokens per microsecond): 7.1788% +/- 2.5682% (2.04 +/- 0.73) (28.44 -> 30.48) Benchmarker (AOT): ``` msec task-clock:u: -4.4173% +/- 1.7793% (-124.29 +/- 50.07) (2813.81 -> 2689.52) page-faults:u: 0.1064% +/- 0.0131% (10.90 +/- 1.35) (10246.00 -> 10256.90) cycles:u: -4.4718% +/- 1.7882% (-546472914.30 +/- 218528412.28) (12220314431.60 -> 11673841517.30) instructions:u: -10.0011% +/- 0.0000% (-2704578213.40 +/- 1611.58) (27042820700.90 -> 24338242487.50) seconds time elapsed: -4.4160% +/- 1.7779% (-0.12 +/- 0.05) (2.82 -> 2.69) seconds user: -4.6324% +/- 1.8285% (-0.13 +/- 0.05) (2.80 -> 2.67) ``` pkg/front_end/lib/src/type_inference/inference_visitor.dart: JIT (tokens per microsecond): 10.1981% +/- 1.2476% (1.58 +/- 0.19) (15.46 -> 17.04) AOT (tokens per microsecond): 8.7843% +/- 1.5781% (1.79 +/- 0.32) (20.42 -> 22.22) Benchmarker (AOT): ``` msec task-clock:u: -5.9322% +/- 2.7532% (-181.01 +/- 84.01) (3051.38 -> 2870.37) page-faults:u: 0.0352% +/- 0.0261% (3.50 +/- 2.59) (9930.90 -> 9934.40) cycles:u: -6.0726% +/- 2.7273% (-805818237.40 +/- 361907438.70) (13269703092.60 -> 12463884855.20) instructions:u: -11.9540% +/- 0.0000% (-3561054138.90 +/- 1016.14) (29789745342.80 -> 26228691203.90) seconds time elapsed: -5.9310% +/- 2.7520% (-0.18 +/- 0.08) (3.05 -> 2.87) seconds user: -6.1531% +/- 2.7477% (-0.19 +/- 0.08) (3.03 -> 2.85) ``` Change-Id: Ia4fbdcbd438a38a0c07b3f4423812ef3507b626c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439880 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
Dart is:
Approachable: Develop with a strongly typed programming language that is consistent, concise, and offers modern language features like null safety and patterns.
Portable: Compile to ARM, x64, or RISC-V machine code for mobile, desktop, and backend. Compile to JavaScript or WebAssembly for the web.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app. Diagnose app issues using DevTools.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents in our repo at docs.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
Future plans for Dart are included in the combined Dart and Flutter roadmap on the Flutter wiki.