commit | d3bbacfa9de9598efdca28195e41f88896e5e599 | [log] [tgz] |
---|---|---|
author | Jens Johansen <jensj@google.com> | Wed Mar 19 02:11:16 2025 -0700 |
committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Mar 19 02:11:16 2025 -0700 |
tree | cbf18300123141e3fc4c3bee33d1bd4805d0f932 | |
parent | 06d938046f72434f55bb10dd64f58bc9108c470d [diff] |
[analyzer] Faster export scope calculation in bad cases With the `big_chain_benchmark` for ImportExportCycle and ImportCycleExportChain it scales a lot better. The other ones (ImportCycle, ImportChain, ImportExportChain) doesn't change. For ImportExportCycle, in AOT mode, before we got: ``` +------+-----------+------------+------------+ | Size | Initial | Completion | Fully done | +------+-----------+------------+------------+ | 16 | 0.46673 | 0.169486 | 0.406448 | | 32 | 0.875871 | 0.242876 | 0.85543 | | 64 | 1.583077 | 0.465915 | 1.506953 | | 128 | 3.198071 | 0.903894 | 3.09165 | | 256 | 6.786677 | 2.149489 | 6.779569 | | 512 | 17.346131 | 8.92149 | 17.971033 | | 1024 | 63.358453 | 46.152089 | 65.401559 | +------+-----------+------------+------------+ ``` now instead we get: ``` +------+-----------+------------+------------+ | Size | Initial | Completion | Fully done | +------+-----------+------------+------------+ | 16 | 0.474942 | 0.166857 | 0.411457 | | 32 | 0.834925 | 0.243397 | 0.76843 | | 64 | 1.608813 | 0.439885 | 1.53438 | | 128 | 3.198453 | 0.805756 | 3.302559 | | 256 | 6.347211 | 1.712426 | 6.165624 | | 512 | 12.874747 | 3.551489 | 13.1461 | | 1024 | 27.14403 | 7.844261 | 27.32785 | +------+-----------+------------+------------+ ``` An almost 6x improvement for completion and 2x+ improvement for both initial analysis and analysing after the change. For ImportCycleExportChain, in AOT mode, before we got: ``` +------+-----------+------------+------------+ | Size | Initial | Completion | Fully done | +------+-----------+------------+------------+ | 16 | 0.454349 | 0.152505 | 0.400889 | | 32 | 0.892146 | 0.302407 | 0.81263 | | 64 | 1.67604 | 0.439954 | 1.517379 | | 128 | 3.335087 | 0.907002 | 3.262481 | | 256 | 6.378526 | 1.943725 | 6.292922 | | 512 | 15.477861 | 6.461358 | 15.560008 | | 1024 | 50.671197 | 33.14349 | 51.689455 | +------+-----------+------------+------------+ ``` now instead we get: ``` +------+-----------+------------+------------+ | Size | Initial | Completion | Fully done | +------+-----------+------------+------------+ | 16 | 0.548357 | 0.166257 | 0.415632 | | 32 | 0.906483 | 0.296618 | 0.910544 | | 64 | 1.623723 | 0.464061 | 1.527888 | | 128 | 3.067769 | 0.801507 | 2.927981 | | 256 | 6.224551 | 1.596711 | 6.098531 | | 512 | 12.941757 | 3.277487 | 12.345753 | | 1024 | 25.870713 | 7.020787 | 25.760605 | +------+-----------+------------+------------+ ``` A ~4.7x improvement on completion and ~2x improvement for both initial analysis and analysing after the change. Change-Id: I052879c1695ad5f0aa63c2d96013a1e3eae96428 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413421 Reviewed-by: Lasse Nielsen <lrn@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.