Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Streamline rent/return on ArrayPool
- Stop storing and using a _bucketArraySizes.  It's cheaper to recompute the shift on each use than it is to index into the array (with a bounds check).  Plus less memory.
- The 99% case is renting a positive length for pooled array sizes (especially now that we've bumped the limit up to a gig).  Move the checks for lengths <= 0 to after the check for whether the length is poolable.
- Move arrays into locals to enable the JIT to eliminate some bounds checks.
- Use ThrowHelpers where we already have them
- Move non-generic helpers out of generic class into Utilities
- Consolidate buffer allocation in Rent to a single line
- Reorganize TLS checks to be as early as possible
- Use FastMod instead of % in per-core stacks
  • Loading branch information
stephentoub committed Jul 15, 2021
commit 91350e3e198fb4a288853b8d213fd5e705bbf6df
Loading