This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] add memrchr(3)


On 05/09/2012 09:17 AM, Yaakov (Cygwin/X) wrote:
> On Wed, 2012-05-09 at 10:48 -0400, Christopher Faylor wrote: 
>> Why not just grab the source from FreeBSD?
>>
>> http://svnweb.freebsd.org/base/head/lib/libc/string/memrchr.c?revision=178051&view=markup
>>
>> (or actually from OpenBSD since that's where the above originated)
> 
> That would have been easy, but then everyone would be complaining that
> its not optimized for speed. :-)

How hard could it be to take memchr.c, and flip the boundary conditions
to start from high to low instead of low to high?  Then you'll have at a
version optimized at least for C (it can be further optimized by
assembly, but that's going above and beyond what it takes to get a new
interface in).

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]