Improve the performance of the type loader (#24177)
Improve the performance of the type loader
- Disable interface ambiguity checks in Corelib
- Improve StackingAllocator perf
- Increase size of allocation blocks
- Cleanup allocation blocks comletely on gc suspension
- Check for presence of generic parameters to methods in a more efficient manner
- Querying the count of GenericParameter records requires a binary search in the GenericParams table
- Checking the generic flag on the method signature is effectively free
- Skip unnecessary checks in EnumerateClassMethods for corelib
- Use Sanity check flag where appropriate
- Use slightly faster hashtable functions in StringLiteralMap
- Remove pointless string literal entry hash table search
- Change stacking allocator to not be allocated for the lifetime of a thread, but instead its allocated/destroyed around the first frame on the thread that needs the allocator.
- Allocate at most 1 stacking allocator per thread
- The allocation is on the stack via _alloca (as managed by the ACQUIRE_STACKING_ALLOCATOR macro
- This will put an 8KB buffer on the stack, and if there is need for a larger buffer it will allocate off of the heap.
- Stacking allocator initial block is always present, so the allocation routine for the allocator can be somewhat simpler
- More logic has been move the the cpp file, to reduce header bloat, and improve iteration when modifying StackingAllocator code
- Avoid use of alloca for StackingAllocator when less than 512KB of stack is available
16 files changed: