On Sun, 25 Jul 2010 10:54:21 +0300
Tom Hacohen <tom.haco...@partner.samsung.com> wrote:

> Hi all,
> 
> I started writing Eina_Binshare (well actually adjusting
> Eina_Stringshare). The guys who wrote Eina_Stringshare cared a lot
> about speed, I mean, everything is split to special (common) cases
> that speed the whole thing up, for example, the case of 1 char
> strings.

If I were you I'd do some benchmarks and see what falls out.

For instance eina_strinshare add has a wacky +3 to the strlen, which
means the common case of a aligned string gets a hit on architectures
using sse optimised strlens or 64 bit arches using plain register
compares. 

> Stringshare can't be used for Binshare (because of the null
> termination) but, if we give up on the 1 char strings special case,
> we can save a lot of code duplication.

That smells like a win to me.  Even better if we have one cache, rather
the two at run time.

> I honestly don't know enough about the usage of the stringshare
> functions around the e code, nor did I do a research on the subject.
> If anyone here knows why I should/shouldn't do what suggested above,
> plesae let me know. Looking at how things stand at the moment, I'm
> going to do it, and just wrap around binshare with inline stringshare
> functions.

Just do some benchmarks, if the optimisations are not a gain or small
gain and get in your way, drop them.

Well that's my thoughts.

        Regards,
        nash

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to