On Sat, 2011-11-19 at 11:44 -0800, Iain Duncan wrote:
On Fri, Nov 18, 2011 at 9:42 PM, David Robillard
<d(a)drobilla.net>
wrote:
On Thu, 2011-11-17 at 20:48 +0100, Tim Blechmann wrote:
> Thanks Tim, I'll def check it out.
What's the difference
to a newbie like
> myself between yours and the one in Jack?
>
> Congrats btw, that's awesome that your work will be in
boost!
the main difference is prbly that the jack ringbuffer is
plain c and
prbly
needs libjack, while boost.lockfree is a c++
library and
header-only.
If you happen to need a C ringbuffer in a program with no
libjack
dependency, here is mine:
http://svn.drobilla.net/zix/trunk/zix/ring.h
http://svn.drobilla.net/zix/trunk/src/ring.c
(No, "zix" isn't a released library, I am doing the copy-paste
code
reuse thing for now to avoid having yet another stable ABI to
worry
about. It might be some day. There's a few other things in
there that
might be useful...)
Thanks! Is this something that is also in RAUL or does RAUL have a
different ring buffer implementation? ( or not have one?)
Actually, this one is a bit better (less barrier overhead), but I will
update the Raul one to be identical (but for C+eyness) soon.
Zix is basically a minimal data structures library where I made the
things necessary to drop the glib dependency from my LV2 stack. It is
newer than Raul which has been around for some time.
Random aside for the data structure inclined: I attempted to replace the
hash in sord with a patricia tree (since I hate clunky
rebuild-the-world-occasionally data structures like hash tables) but I
was unable to compete with the hash for small key sizes which is the 99%
case for LV2. However, if you need a dictionary keyed by *long*
strings, ZixPatree completely destroys ZixHash and GHash according to my
benchmarks, particularly if you have SSE4.2.
I would still very much like to have a realtime safe and thread safe
string dictionary for interning. This would be very useful for LV2. I
am not sure if it is feasibly possible, though.
-dr