Search Issue Tracker
By Design
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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
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.