[analyzer] Don't utf8-encode needlessly in ApiSignature.addString Comparing a before and an after aot-compiled analysis server, running each 25 times, via `pkg/front_end/tool/benchmarker.dart`: ``` out/ReleaseX64/dart pkg/front_end/tool/benchmarker.dart \ --iterations=25 \ --snapshot=pkg/analysis_server/bin/server.aot.2 \ --snapshot=pkg/analysis_server/bin/server.aot.3 \ --arguments="--disable-file-byte-store" \ --arguments="--train-using" \ --arguments="pkg/front_end/lib/" ``` (where `server.aot.2` is an aot-compile of the parent CL and `server.aot.3` is an aot-compile with this CL) gets this result: ``` msec task-clock:u: -1.5762% +/- 0.7803% (-131.97 +/- 65.33) (8372.91 -> 8240.93) page-faults:u: 0.7490% +/- 0.1986% (1161.20 +/- 307.82) (155028.84 -> 156190.04) cycles:u: -1.6791% +/- 0.8074% (-586734139.48 +/- 282150958.07) (34944191636.32 -> 34357457496.84) instructions:u: -2.0051% +/- 0.0614% (-926171189.36 +/- 28378206.66) (46190016825.56 -> 45263845636.20) seconds time elapsed: -1.5786% +/- 0.7789% (-0.13 +/- 0.07) (8.39 -> 8.26) seconds user: -1.5335% +/- 0.7902% (-0.12 +/- 0.06) (8.02 -> 7.89) Scavenge( new space) goes from 134 to 131 MarkSweep( old space) goes from 1 to 0 Evacuate(store buffer) goes from 1 to 0 Notice combined GC time goes from 2766 ms to 2664 ms (notice only 1 run each). ``` This seems quite high and is more than I've gotten before rebases etc, so I'm guessing this has been lucky with GCs or something. Running it on `pkg/analyzer/lib/` instead (only 5 times) I get: ``` msec task-clock:u: -2.1880% +/- 1.2579% (-227.09 +/- 130.55) (10378.74 -> 10151.65) cycles:u: -2.2829% +/- 1.3197% (-988942892.00 +/- 571677673.33) (43320229255.60 -> 42331286363.60) instructions:u: -1.9075% +/- 0.5803% (-1080089151.00 +/- 328577465.65) (56624410628.20 -> 55544321477.20) seconds time elapsed: -2.1807% +/- 1.2533% (-0.23 +/- 0.13) (10.39 -> 10.17) seconds user: -1.9061% +/- 1.4734% (-0.19 +/- 0.15) (9.94 -> 9.75) Scavenge( new space) goes from 168 to 164 MarkSweep( promotion) goes from 17 to 15 MarkSweep( old space) goes from 4 to 2 Notice combined GC time goes from 3228 ms to 3723 ms (notice only 1 run each). ``` which looks ~similar though so I don't know. Change-Id: I21c9dd6fd5e122f65ec596551af8a2ec464d3920 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428320 Reviewed-by: Konstantin Shcheglov <scheglov@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.