HeadlinesBriefing favicon HeadlinesBriefing.com

Hakozuna Surpasses mimalloc at High Thread Counts

DEV Community •
×

In the realm of high-performance memory allocators, hakozuna has achieved a significant milestone by surpassing mimalloc in scenarios with higher thread counts, specifically at T=16. This breakthrough was made possible by the introduction of the specialized Lane16 build, which focuses on optimizing CAS (Compare-And-Swap) operations. This optimization has led to improved performance and stability under heavy contention, a common challenge in multi-threaded environments.

The performance gains are substantial, with Lane16 achieving a +6.8% lead over mimalloc in median performance. This success is attributed to the refined CAS implementation, which has been a key factor in achieving higher stability and improved performance. The benchmark results, which include 10 consecutive runs, show that Lane16 consistently outperforms its competitor, with a median performance of 80.7M ops/s compared to mimalloc's 75.6M ops/s.

This achievement underscores the potential of hakozuna in high-concurrency scenarios, where traditional allocators often struggle. As thread counts increase, the efficiency of memory allocation becomes critical, and hakozuna's ability to scale effectively positions it as a strong contender in the field. While this is still an experimental project, the results suggest a promising future for hakozuna in production environments.