commit | 84e279d27968c1555c80411f6fbcdf994ef1afe5 | [log] [tgz] |
---|---|---|
author | Jens Johansen <jensj@google.com> | Fri Jul 04 05:59:12 2025 -0700 |
committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jul 04 05:59:12 2025 -0700 |
tree | a6f32615a640ac7d3590188a0c63bc05d450feb9 | |
parent | 7b541da59b7e84c1e102974f350a8b8601d4e612 [diff] |
[CFE] Remove ~19 mb of allocations caused by iterators etc * Remove ~2.8mb of iterators in SourceMethodBuilder * Remove ~0.7mb of iterators in calculateBounds * Remove ~1.7 mb of iterators in ClassMembersNodeBuilder.build * Remove ~1.9mb of iterators in BuilderFactory.computeBuildersByName * Remove ~3mb of iterables and iterators in findRecordUseAnnotation * Remove ~3mb of allocations from List.iterator in InferenceVisitorBase._inferInvocation * Another ~6.3mb of iterables in various places in chunks of ~100-800kb. Running a benchmark of the CFE compiling the CFE I get this: ``` msec task-clock:u: -5.9719% +/- 0.3845% (-342.77 +/- 22.07) (5739.61 -> 5396.84) page-faults:u: -2.6307% +/- 0.0630% (-2951.12 +/- 70.63) (112178.18 -> 109227.06) cycles:u: -6.1751% +/- 0.3921% (-1471343183.50 +/- 93434420.74) (23827045867.84 -> 22355702684.34) instructions:u: -5.0116% +/- 0.0006% (-1385443477.90 +/- 176957.44) (27644543467.86 -> 26259099989.96) branch-misses:u: -6.0357% +/- 1.7661% (-5562845.14 +/- 1627775.60) (92165665.40 -> 86602820.26) seconds time elapsed: -5.9868% +/- 0.3830% (-0.34 +/- 0.02) (5.75 -> 5.40) seconds user: -6.0365% +/- 0.4515% (-0.33 +/- 0.02) (5.47 -> 5.14) seconds sys: -4.6542% +/- 3.6415% (-0.01 +/- 0.01) (0.27 -> 0.26) Scavenge( new space) goes from 64 to 63 MarkSweep( promotion) goes from 9 to 8 Evacuate(store buffer) goes from 2 to 1 ``` Worth noticing, though, is that the before numbers (e.g. 5739.61 ms task-clock:u) is very close to the before numbers from https://dart-review.googlesource.com/c/sdk/+/438681 (5767.31 ms) and not the after numbers on that cl (5478.56 ms) --- so something weird is going on here. Change-Id: I67248bbde47900435ababcb1a2d5ecff2dde5c13 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438722 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.