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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.