[vlc-devel] memcpy

Rafaël Carré funman at videolan.org
Sat May 5 23:51:43 CEST 2012


Le 05/05/2012 15:56, Rémi Denis-Courmont a écrit :
> Le samedi 5 mai 2012 21:21:22 Rafaël Carré, vous avez écrit :
>> Therefore it would make sense to only use that memcpy on Windows, and
>> maybe import glibc memcpy() since it seems to be better.
> 
> I have been advocating complete removal of memcpy() optimizations already some 
> time ago. It was not like that ten years ago, but nowadays glibc is better 
> than VideoLAN at tracking new SIMD instruction sets. Furthermore gcc provides 
> a mechanism for run-time CPU-dependent functions. glibc can use that, but VLC 
> not since it is non-standard.

It seems it can matter (e.g. on Windows), but the improvement is quite
small, so I'm ok for complete removal.

>> Since I don't have old MMX only CPU, perhaps it would make sense to
>> leave fast_memcpy for i386 (and Windows), and always use memcpy() on
>> x86_64 ?
> 
> I don't see how that's specific to 64-bits.

I only tested on x86_64.

I also don't have Altivec hardware to test (where is veda machine?)



More information about the vlc-devel mailing list