Commit 664b962
authored
Reduce RuntimeType.MakeGenericType overheads (#45137)
- Avoid an extra GetGenericArguments() call for all arities.
- Special-case a Type[] with just one type. In looking at all calls to MakeGenericType when starting up a basic ASP.NET MVC app, 70% were for a single generic argument (the rest were for two).1 parent aebd598 commit 664b962
2 files changed
Lines changed: 30 additions & 7 deletions
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
525 | 536 | | |
526 | 537 | | |
527 | 538 | | |
| |||
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3238 | 3238 | | |
3239 | 3239 | | |
3240 | 3240 | | |
3241 | | - | |
3242 | | - | |
3243 | 3241 | | |
3244 | | - | |
3245 | | - | |
| 3242 | + | |
3246 | 3243 | | |
3247 | | - | |
| 3244 | + | |
| 3245 | + | |
3248 | 3246 | | |
3249 | 3247 | | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
3250 | 3264 | | |
3251 | 3265 | | |
3252 | 3266 | | |
| |||
3277 | 3291 | | |
3278 | 3292 | | |
3279 | 3293 | | |
3280 | | - | |
3281 | | - | |
3282 | 3294 | | |
3283 | 3295 | | |
3284 | 3296 | | |
| |||
0 commit comments