Expand description
Utilities for optimizing clone operations
This module provides simple utility functions to help optimize clone operations by using Arc sharing where appropriate.
Functionsยง
- clone_
shared_ allocation - Clone an Arc-shared AllocationInfo (cheap operation)
- optimized_
clone - Optimize a clone operation by choosing between regular clone and Arc sharing
- share_
allocation_ info - Create an Arc-shared version of AllocationInfo
- share_
allocation_ vector - Create a shared vector of allocations
- should_
use_ arc_ sharing - Check if a type should use Arc sharing based on size and usage patterns
- unshare_
allocation_ info - Convert Arc-shared back to regular AllocationInfo when needed