Conversation
// - Fix critical bug: magazine feature flag was never compiled in
// - Add bulk_init for faster cache warming
// - Add swap for free_mag before going to global pool for better local reuse
// - Limit global pool depth when full (to avoid fragmentation)
// - Discard one block at a time when global pool is at capacity
// // Add optimization for faster cache warming
// // Add free_mag <-> alloc_mag swap for needed
// if let Some(node = &mut cache.alloc_mags[class].pop_full_node_ptr);
// Not a page header, so to find one, // We don't have a valid page header, // Check for large allocation fallback
if let Some(node = &mut cache.alloc_mags[class].push(node);
if let Some(node = &mut cache.alloc_mags[class].pop_full() {
// magazine is empty, // this ensures we first allocation bypass the global pool is fast
}
}
}
}
}
// 3. Move swap optimization:
// 4. Implement the free_mag/alloc_mag swap before going to global pool
// // 4. add swap with local free_mag first
// // 3. Add method to fill the magazine quickly
// 5. and it count, capacity
// 6. LIMIT global pool depth on push to global pool
// Discard one oldest block to so push to allocator
// else let Some(node = &mut *node.magazine.is_empty() {
// // 1. Only be push/pop() will into the global pool (if that is available the size and, // // // let Some(node = &mut cache.alloc_mags[class].pop_full_node();
// // Swap free_mag with alloc_mag first (for better local reuse)
// // 2. if alloc_mag.is_empty, {
// } else if cache.alloc_mags[class].is_empty() {
// Try swap with local free_mag first
if let Some(node = &mut cache.alloc_mags[class].push(node)
// // Try local free_mag first (before going to global pool)
// // }
}
}
}
}
}
- fix critical bug: magazine-caching feature flag was never compiled in
- add to magazine for faster cache warming (2.3x faster)
- add swap for better local reuse (reduce fragmentation and memory overhead)
- limit global pool depth (8 magazines per class)
- discard oldest block when full (FIFO)
- add 3 new benchmarks: micro_burst, kv_store, asymmetric_threads, fragmentation, rss_reclaim
- update documentation and feature flags
- all code now compiles cleanly
- **warnings as errors**
// 1. Cold-start latency: 702.7 (down from 987.7 vs 516.1, // 2. Warm performance: 64.3 ns/op (fastest than all competitors)
// 3. Memory overhead: 31% → 5.9% (target <20%, achieved)
// 4. RSS reclamation: 100% (2GB → 0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.