Skip to content

Annotate is native aot compatible #1543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

OleRoss
Copy link

@OleRoss OleRoss commented Apr 13, 2025

Dupliate of deleted #1532

OleRoss added 2 commits April 25, 2025 18:44
- Add IsAotCompatible to UnitsNet
  - Added EnumHelpers which provides a way to get enum values independent of target platform
  - Replaced generation of `GetQuantityTypes` with `RegisterDefaultConversions` to avoid reflection
- Add IsAotCompatible to UnitsNet.NumberExtensions
- Add IsAotCompatible to UnitsNet.JsonNet
@OleRoss OleRoss force-pushed the annotate-is-native-aot-compatible branch from fdb3f93 to ee4acd1 Compare April 25, 2025 17:14
@OleRoss
Copy link
Author

OleRoss commented Apr 25, 2025

@angularsen I rebased on the current master - it was much easier due to the latest commits

And, just for fun, I added a startup performance comparison :)

Default startup performance (PerfTest_Startup):

| Name      | Mean            | StdDev        | StdErr       | Min             | Max             | P95             | P90             | Outliers |
| --------- | --------------- | ------------- | ------------ | --------------- | --------------- | --------------- | --------------- | -------- |
| Default   | 2463,4326ms     | 386,9283ms    | 88,7674ms    | 1930,7473ms     | 3242,5405ms     | 3182,9327ms     | 3017,8285ms     | 1        |

NativeAot compilation startup performance (PerfTest_Startup_Aot):

| Name    | Mean      | StdDev   | StdErr    | Min        | Max        | P95        | P90 | Outliers |
| ------- | --------- | -------- | --------- | ---------- | ---------- | ---------- | --- | -------- |
| Default | 186,438ms | 47,942ms | 10,9986ms | 280,4149ms | 279,2135ms | 275,9632ms | 1   |          |

@lipchev
Copy link
Collaborator

lipchev commented Apr 25, 2025

@angularsen I rebased on the current master - it was much easier due to the latest commits

And, just for fun, I added a startup performance comparison :)

Default startup performance (PerfTest_Startup):

| Name      | Mean            | StdDev        | StdErr       | Min             | Max             | P95             | P90             | Outliers |
| --------- | --------------- | ------------- | ------------ | --------------- | --------------- | --------------- | --------------- | -------- |
| Default   | 2463,4326ms     | 386,9283ms    | 88,7674ms    | 1930,7473ms     | 3242,5405ms     | 3182,9327ms     | 3017,8285ms     | 1        |

NativeAot compilation startup performance (PerfTest_Startup_Aot):

| Name    | Mean      | StdDev   | StdErr    | Min        | Max        | P95        | P90 | Outliers |
| ------- | --------- | -------- | --------- | ---------- | ---------- | ---------- | --- | -------- |
| Default | 186,438ms | 47,942ms | 10,9986ms | 280,4149ms | 279,2135ms | 275,9632ms | 1   |          |

@OleRoss I haven't been able to do my own aot-enabled publish (haven't installed the c++ stuff yet), but am very curious to see how the 🐲 version performs: if you got the time, could you please run it against this PR: #1544

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants