Skip to content

Commit

Permalink
[android] update AOT profiles (#6834)
Browse files Browse the repository at this point in the history
In #6820 Rachel and I noticed that there were quite a few API changes
that made the `.aotprofile`'s for MAUI out of date.

Looking at the [JIT times report][0] for the .NET Podcast app, I saw a
couple we could address:

Total (ms) |  Self (ms) | Method
      2.61 |       2.61 | string:SplitInternal (string,string[],int,System.StringSplitOptions)
      1.57 |       1.57 | System.Number:NumberToString (System.Text.ValueStringBuilder&,System.Number/NumberBuffer&,char,int,System.Globalization.NumberFormatInfo)
      1.52 |       1.52 | System.Number:TryParseInt32IntegerStyle (System.ReadOnlySpan`1<char>,System.Globalization.NumberStyles,System.Globalization.NumberFormatInfo,int&)

I added usage of `string.Split()`, `int.Parse()`, and `int.ToString()`
to `CommonMethods.cs`.

[0]: https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/profiling.md#profiling-the-jit-compiler

~~ Results ~~

Testing on a Pixel 5, an average of 10 runs.

.NET Podcast app:

    Average(ms): 796.8
    Std Err(ms): 3.47626875319565
    Std Dev(ms): 10.992927018972
    ---
    Average(ms): 786.8
    Std Err(ms): 2.0591260281974
    Std Dev(ms): 6.51152823843988

`dotnet new maui`:

    Average(ms): 563.7
    Std Err(ms): 3.26955654485436
    Std Dev(ms): 10.3392456204503
    ---
    Average(ms): 545.3
    Std Err(ms): 2.39930545505708
    Std Dev(ms): 7.5872700404471
  • Loading branch information
jonathanpeppers authored May 5, 2022
1 parent ee8110a commit a42e2c6
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 126 deletions.
Binary file modified .nuspec/maui-blazor.aotprofile
Binary file not shown.
Loading

0 comments on commit a42e2c6

Please sign in to comment.