Tuesday, October 6, 2009

Another container code to share

This time it is a C# red-black binary tree.

I wrote it when I considered reimplementing TreeView and ListView standard controls. Their performance was a bottleneck. I thought that making similar controls that use less memory allocations and better sorting algorithms could solve it. However after I reduced the number of posted messages, the performance became pretty decent.

Thus the tree is not used in the Puppeteer at this moment in time, but still it is a pretty good red-black tree. The performance was improtant, so I tried to avoid memory allocations as much as possible.

2 comments:

  1. Use pastebin.com instead of 4shared.com

    ReplyDelete
  2. Pastebin does not allow uploading files, does it?
    All I need is a file storage.

    ReplyDelete