Performance Issues
We are confident that SmartHeap significantly out-performs most heap managers. We have benchtests that demonstrate this, and we offer the benchtest source for download so users can run the tests themselves. If you have your own benchtest program for evaluating heap managers, please read this. If you are not seeing any performance improvement in an app linked with SmartHeap, we would recommend generating a map file to verify that SmartHeap is indeed properly linked in. A properly linked EXE/DLL will have the symbol "SmartHeap_malloc" in its map file. For tips on how best to link your Win32 app to SmartHeap, please see our Knowledge Base article on linking.That being said, performance improvements in a specific app are dependent on:
- How intensively the app exercises heap memory management. (If mem management isn't a performance bottleneck for your app, then one mem manager may appear to do as well as another.)
- The amount of memory available on the machine at runtime.
Some other considerations:
- Only the SmartHeap runtime libraries are optimized for performance. Do not use the debug libraries for your performance tests.
Debug SmartHeap performs as well as most debug libraries and better than some, but it is designed to catch bugs, not to run fast. - SmartHeap's default configuration does not always give the best results.If you are simply linking SmartHeap to your application and not using the SmartHeap API, SmartHeap will use its default settings to manage the heap. These settings are chosen to optimize performance for a "typical" application. If your app isn't what we would call typical, you may need to tweak these settings to get optimum performance. In particular, apps that allocate a lot of large blocks (4 K and above) may benefit from increasing the page size to 64 K. SmartHeap sub-allocates blocks smaller than 1/4 of the page size from the pool and makes system calls for larger blocks (the 4 K figure above assumes a default page size of 16 K). Increasing the page size will result in fewer system calls. See the API Reference for
MemDefaultPool
andMemPoolSetPageSize
in the Programmer's Guide for more info. There is additional information and tips on page size in Appendix C (see below) and at the back of the SmartHeap Getting Started guide.
Please refer to Appendix C of the SmartHeap Programmer's Guide for more information on evaluating and maximizing SmartHeap's performance, and contact MicroQuill tech support if you have any unanswered questions.