Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
0
Found in
2021.3.18f1
2022.2.9f1
2023.1.0b5
2023.2.0a4
Issue ID
UUM-30376
Regression
No
[IL2CPP] Execution performance doesn't improve when "in" parameter is used
How to reproduce:
1. Open the attached “IN-31693” project
2. Open the “Window → General → Test Runner” window from the menu
3. Click on the “Run All Tests” button to build and analyse performance
4. Open the “Window → Analysis → Test Report” window
5. View the Sample Group View results for “In_ImmutableLargeStruct_WithInOr” test
Expected result: Execution performance improved at least 8 times using the “in” modifier
Actual result: Barely no performance improvement
Reproducible with: 2020.3.46f1
Fixed in: 2021.3.18f1, 2022.2.9f1, 2023.1.0b5, 2023.2.0a4
Note: Even though, in some versions both with and without “in” modifier
performance results are the same, they’re low and considered as expected
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on CollectAllSceneManagerAndObjectIDs when opening a specific Scene
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- SetComponentEnabled uses class instead of struct when constraining Enableable Component type
- [iOS] Application.deepLinkActivated does not get invoked while app is running when UIApplicationSceneManifest is added in Info.plist
Resolution Note:
As noted in comments, the performance is as expected on IL2CPP.
The big discrepancy seen in Mono does not translate into IL2CPP as the C++ code generated is very similar between the scenarios, and the only real difference in performance comes from passing the struct as a reference, or by copy, due to the copy operation.
Resolution Note (2023.2.X):
As noted in comments, the performance is as expected on IL2CPP.
The big discrepancy seen in Mono does not translate into IL2CPP as the C++ code generated is very similar between the scenarios, and the only real difference in performance comes from passing the struct as a reference, or by copy, due to the copy operation.