commit | debc16cd4cb5d3d5d40f8343c5a6092d7edcd8c7 | [log] [tgz] |
---|---|---|
author | Jacob MacDonald <jakemac@google.com> | Fri Dec 06 08:33:33 2024 -0800 |
committer | GitHub <noreply@github.com> | Fri Dec 06 08:33:33 2024 -0800 |
tree | 5045a84119b2debfb5255458167bc945fc99afbc | |
parent | 66baf8b8266d393d2034f02d898723e9318f3ab4 [diff] |
add benchmark for real wrapper classes around a JsonBuffer (#151) This helps us to evaluate how much extension types are actually buying us, by benchmarking against thin wrappers around maps. There are many advantages of real wrappers, such as type checks can actually work, and we can have many different implementations. I have a specific idea in mind here, which is that the analyzer/CFE could provide their own thin wrapper implementations of these types, which wrap the analyzer/CFE representations and implement lazy getters. This would potentially allow us to handle all the query filtering, by just lazily reading the properties we care about into a new (buffer based) representation of the object, based on the fields present in the query. Results are as follows: ``` SdkMapsJsonWireBenchmark: 1896ms, 7177227 bytes SdkMapsBufferWireBenchmark: 1984ms, 5122684 bytes SdkMapsBuilderWireBenchmark: 1631ms, 4859868 bytes LazyMapsJsonWireBenchmark: 1099ms, 7177227 bytes LazyMapsBufferWireBenchmark: 590ms, 5122684 bytes LazyWrappersBufferWireBenchmark: 424ms, 2111761 bytes BuilderMapsJsonWireBenchmark: 1394ms, 7177227 bytes BuilderMapsBuilderWireBenchmark: 396ms, 2111761 bytes ProcessSdkMapsJsonWireBenchmark: 161ms, hash 23186292 ProcessLazyMapsBufferWireBenchmark: 257ms, hash 23186292 ProcessLazyWrappersBufferWireBenchmark: 362ms, hash 23186292 ProcessBuilderMapsBuilderWireBenchmark: 356ms, hash 23186292 ```
This repository is home to various macro related Dart packages.
Package | Description | Version |
---|---|---|
_analyzer_macros | Macro support for the analyzer. | |
_cfe_macros | Macro support for the CFE. | |
_macro_builder | Builds macros. | |
_macro_client | Connects user macro code to a macro host. | |
_macro_host | Hosts macros. | |
_macro_runner | Runs macros. | |
_macro_server | Serves a macro_service . | |
_test_macros | Some test macros. | |
dart_model | Data model for information about Dart code, queries about Dart code and augmentations to Dart code. Serializable with a versioned JSON schema for use by macros, generators and other tools. | |
macro | For implementing a macro. | |
macro_service | Macro communication with the macro host. | |
generate_dart_model |
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
For additional information about contributing, see our contributing page.