[vlc-devel] The "optimized" memory copies

Måns Rullgård mans at mansr.com
Thu Aug 20 03:25:33 CEST 2009


Rafaël Carré <rafael.carre at gmail.com> writes:

> On Wed, 19 Aug 2009 22:01:51 +0300
> "Rémi Denis-Courmont" <remi at remlab.net> wrote:
>
>> 	Hello,
>
> Hi,
>
>> It turns out that vlc_memset() was about 2% slower than plain
>> memset()... so I kinda wonder why we bother with implementing it.
>> 
>> But then, vlc_memcpy() was an outrageous 35% slower than plain
>> memcpy() on no- first pass, and 200% (three times, yes!) slower on
>> the first pass. Sorry but WTF?
>
> It probably was useful some years ago, but now I think the various libc
> (and gcc?) use fast implementations.
>
> The (Fucking Fast?) ffmpeg has no custom routine for these.

That's because we try hard to avoid calling it at all.  As a result,
no time worth mentioning is wasted there, and keeping our own version
isn't justified.  As you may know, we're not usually afraid of rolling
our own when compilers or standard libraries aren't as good as we'd
like.

-- 
Måns Rullgård
mans at mansr.com




More information about the vlc-devel mailing list