[Flac-dev] libFLAC bitbuffer optimizations

Eric Wong eric at petta-tech.com
Mon Jan 24 19:24:31 PST 2005


Josh Coalson <xflac at yahoo.com> wrote:
> Eric, I finally got around to your patches after Miroslav's.
> the first one (the memcpy/memset replacement) I had problems
> with, one because the buffers can overlap so I had to use
> memmove (is this usually assembly in libc too?) and also the
> endpoints looked wrong, for my full patch see below. speedup
> for me was around 3%

memmove is based on memcpy in uclibc for ARM, and I'd imagine so for
other platforms as well.  I had memmove originally, but was convinced at
the time they wouldn't overlap.

> the second patch got another 2%.  a question though, why do
> you have:
> 
> +              *(++vals);
> 
> in two places instead of just ++vals; ?

Lack of sleep :)

-- 
Eric Wong
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20050124/35890937/attachment.pgp


More information about the Flac-dev mailing list