On Tue, 15 Dec 2009, Gabriel M. Beddingfield wrote:

> However, a string class could be created that meets the requirement:
>
>    template <typename CharT, size_t Max>
>    class RtString
>    {
[snip]

OK, for some reason I've been obsessed with this class for 
the past few days.  You can find my work here:

    http://gitorious.org/composite/composite-labs/trees/master/200912-rtstring

Especially the RtString.hpp header file.  This class has 
been tested and is pretty stable now.[1]

Not only is it real-time safe, but copying its contents to a 
char* buffer is real-time safe.  On top of that, it's 
friggin' fast.  I've benchmarked it as follows:

    RtString is 3x faster than std::ostream + std::string
    RtString is 5-6x faster than QString
    RtString is 5-6x faster than boost::format + std::string

Comments are welcome!

Peace,
Gabriel

[1] at least with CharT = char.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to