Just a quick heads up on some great OpenSolaris code that not everyone may
be familiar with. Its a library that supports AVL trees (uu_avl*) and
linked-lists (uu_list*) and is available as a private library [1] at
/lib/libuutil.so.1. There is a brief writeup at the Hahnsters [2] blog
at: http://blogs.sun.com/sch/date/20050614. And you can get started using
it quickly by examining the "usage" guide, cleverly embedded in libuutil.h
at usr/src/lib/libuutil/common/ in the OpenSolaris source and by looking
for other usages within the OpenSolaris code base.
Initially, I did some testing on a ~ 327,000 node uu_avl tree and compared
the time taken to retrieve 327 entries to the time taken to retrieve the
same entries stored in a hand-tuned hash table. Basically the uu_avl was
1/2 the speed of the hash table - but the hash based code is
single-threaded, whereas uu_* is thread safe. So I'd characterize
performance as *excellent*.
Our first (commercial) application that uses uu_* is a major update to a
piece of code that does traffic management in a messaging application.
So out went the customized hash table and in went a set of data stuctures
where a subscriber is represented in an AVL tree node and it contains a
pointer to a uu_list of recent messages (typically all messages in the
last five minutes). The resulting code is very clean, easy to read and
maintain and highly performant. Overall a very successful major update
to this code.
Bottom line: libuutil is Very Good Stuff (TM) and its use will be expanded
within our applications - old and new.
Now if we were taking a vote to make libuutil Public, this would get my
+100 vote. And a set of man pages would be most welcome.
Kudos to libuutils developers - awesome work.
[1] there is no symbolic link from /lib/libuutil.so -> /lib/libuutil.so.1.
You can easily resolve this issue and create one!
[2] Sorry Stephen - that's Stephen Hahns blog! :)
Regards,
Al Hopper Logical Approach Inc, Plano, TX. [EMAIL PROTECTED]
Voice: 972.379.2133 Fax: 972.379.2134 Timezone: US CDT
OpenSolaris.Org Community Advisory Board (CAB) Member - Apr 2005
OpenSolaris Governing Board (OGB) Member - Feb 2006
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code