Friday, November 21, 2008

Preliminary release of the C Data Structure Library

Now that I've got two data structures down solid, I went ahead and worked out the release process. The 0.1-alpha release of the C Data Structure Library is now available on the SourceForge website. A separate package was uploaded with the Doxygen docs (for those who don't want to build them themselves). Please download it and try it out!

To prepare for release I got the code compiling as C89, C99, and C++, and got it building under Windows in Visual Studio 2005 and 2008. Interestingly, the performance comparison of list versus doubly-linked lists is quite one-sided on Windows: the doubly-linked list is much slower, for some reason (perhaps a more expensive allocator). It's a little tricky asserting that the .vcproj/.sln files are public domain, since they're partly boilerplate generated by the tools, but I stripped out any of the content that didn't serve a functional purpose.

What next? Lots to do. Probably the most painfully needed is some kind of string. Strings are pretty straightforward until I start worrying about encoding - at the very least UTF8 and UTF16 support would be handy. Beyond that is associative array data structures, like hash tables, some kind of cache-friendly self-balancing search tree, and a simple association list for small dictionaries. What about after that? Well, I look to other libraries for inspiration.
  • Bit arrays.
  • There's a deque data structure that uses a dynamic array like a circular buffer.
  • Priority queues (a buffer tree or funnel heap is a good candidate for cache efficiency).
  • Stacks and queues, simpler interfaces on top of existing structures.
  • Sets supporting union and intersection.
  • Ropes.
  • Disjoint-set data structures.
  • Maybe collections for parallel programming? This could be hard to do in a platform-independent way.
All content in this document is granted into the public domain. Where this is not legally possible, the copyright owner releases all rights. This notice may be modified or removed.

1 comment: