Heap testing
-
- Posts: 16
- Joined: Thu Mar 01, 2018 10:09 am
Heap testing
What algorithms do you use when testing heap performance? How to read the code execution time? With the help of PIT?
Re: Heap testing
Compile on your host system and benchmark using available tools for that system. E.g visual studio offers great tools for performance profiling.
-
- Member
- Posts: 426
- Joined: Tue Apr 03, 2018 2:44 am
Re: Heap testing
What do you mean by "heap performance"?grenders22 wrote:What algorithms do you use when testing heap performance? How to read the code execution time? With the help of PIT?
Peak allocations/second? Allocation overhead? Time/space overhead? Concurrency and scalability?
A heap will have many, sometimes contradictory, performance metrics. For example, an allocator that is optimal in single threaded mode, may well have course grained locking as a result, and pay the price in concurrent scalability.
Similarly, a highly concurrent allocator might have a higher locking overhead, or have per-CPU memory caches which increase space overhead and reduce memory utilisation.
Personally, I'm happy with a heap that is correct and doesn't corrupt itself. I've still lots to implement before I have a have a practical usable kernel, and so long as my heap interface is sufficiently abstract, I can change/optimize/replace the heap easily, so unless you have a particular interest in optimized heap implementation, I'd limit performance tuning to making sure your algorithms are reasonably scalable. Ie. Use data structures to track allocations that don't degrade badly as counts go up, so avoid things like linear scans of linked lists.
First Rule of Optimization