Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Class] Cache the IntPtr constructors in a dictionary. (#5016)
Using reflection to find these constructors is computation-intensitive, so cache the results. Numbers ======= Test case: rolfbjarne/TestApp@004283d Fix 1 refers to PR #5009. Fix 2 refers to PR #5013. Fix 3 is this fix. iPad Air 2 ---------- | Configuration | Before | After fix 1 | After fix 2 | After fix 3 | Improvement from fix 2 to fix 3 | Cumulative improvement | | ------------------- | ------ | ----------: | -----------: | -----------: | ------------------------------: | ---------------------: | | Release (link all) | 477 ms | 481 ms | 224 ms | 172 ms | 52 ms (23%) | 305 ms (64%) | | Release (dont link) | 738 ms | 656 ms | 377 ms | 201 ms | 176 ms (47%) | 537 ms (73%) | iPhone X -------- | Configuration | Before | After fix 1 | After fix 2 | After fix 3 | Improvement from fix 2 to fix 3 | Cumulative improvement | | ------------------- | ------ | ----------: | -----------: | -----------: | ------------------------------: | ---------------------: | | Release (link all) | 98 ms | 99 ms | 42 ms | 31 ms | 11 ms (26%) | 67 ms (68%) | | Release (dont link) | 197 ms | 153 ms | 91 ms | 43 ms | 48 ms (53%) | 154 ms (78%) | When linking all assemblies, the type map has 24 entries, and when not linking at all it has 2993 entries. This is part 3 of multiple fixes for #4936.
- Loading branch information
097e3fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Jenkins job (on internal Jenkins) succeeded
✅ Build succeeded
✅ API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
✅ Generator Diff (no change)
✅ Test run succeeded