Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

[Dart] Update Shelf framework and add AOT variant#10853

Merged
msmith-techempower merged 3 commits into
TechEmpower:masterfrom
iapicca:add_shelf_aot
Mar 10, 2026
Merged

[Dart] Update Shelf framework and add AOT variant#10853
msmith-techempower merged 3 commits into
TechEmpower:masterfrom
iapicca:add_shelf_aot

Conversation

@iapicca
Copy link
Copy Markdown
Contributor

@iapicca iapicca commented Mar 8, 2026

Summary

This PR bumps the dependencies for the Dart shelf framework and adds an AOT variant.

Changes

  • Bumped dependencies for the existing implementation.
  • Added all necessary files for the AOT implementation and updated benchmark_config.json.

);

/// Responds with the JSON test to the [request].
Response _jsonTest() => _sendJson(const {'message': 'Hello, World!'});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that I spent some time learning about Dart and this const bit. Seems to do the work of instantiating a new object from that constant map every request.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msmith-techempower
it's awesome that you are learning Dart <3

AFAIK const is calculated at compile time, so there shouldn't be any perfermance difference between

Response _jsonTest() => _sendJson(const {'message': 'Hello, World!'});

and

const _message =  {'message': 'Hello, World!'};
/// ...
Response _jsonTest() => _sendJson(_message);

literals like Strings without runtime variables (both var and final) should be automatically compiled as const like below

Response _plaintextTest() => _sendText('Hello, World!');

side note: I tried to leave most of the native implementation"untouched" and theaotversion as close as possible tonative` to keep the comparison relevant.

@msmith-techempower msmith-techempower merged commit 38621af into TechEmpower:master Mar 10, 2026
3 checks passed
DavideD pushed a commit to DavideD/FrameworkBenchmarks that referenced this pull request Mar 16, 2026
* update existing implementation

* udd shelf AOT implementation

* fix typo in benchmark_config.json
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants