<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/string, branch v0.9.6</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>asm for memmove on i386 and x86_64</title>
<updated>2012-09-10T23:04:24+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-10T23:04:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2bf469310de6793228c103691859ed4d3158b117'/>
<id>2bf469310de6793228c103691859ed4d3158b117</id>
<content type='text'>
for the sake of simplicity, I've only used rep movsb rather than
breaking up the copy for using rep movsd/q. on all modern cpus, this
seems to be fine, but if there are performance problems, there might
be a need to go back and add support for rep movsd/q.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for the sake of simplicity, I've only used rep movsb rather than
breaking up the copy for using rep movsd/q. on all modern cpus, this
seems to be fine, but if there are performance problems, there might
be a need to go back and add support for rep movsd/q.
</pre>
</div>
</content>
</entry>
<entry>
<title>reenable word-at-at-time copying in memmove</title>
<updated>2012-09-10T22:16:11+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-10T22:16:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=1701e4f3d46b14c4c4be8a46e64f8eaf15a5c061'/>
<id>1701e4f3d46b14c4c4be8a46e64f8eaf15a5c061</id>
<content type='text'>
before restrict was added, memove called memcpy for forward copies and
used a byte-at-a-time loop for reverse copies. this was changed to
avoid invoking UB now that memcpy has an undefined copying order,
making memmove considerably slower.

performance is still rather bad, so I'll be adding asm soon.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
before restrict was added, memove called memcpy for forward copies and
used a byte-at-a-time loop for reverse copies. this was changed to
avoid invoking UB now that memcpy has an undefined copying order,
making memmove considerably slower.

performance is still rather bad, so I'll be adding asm soon.
</pre>
</div>
</content>
</entry>
<entry>
<title>use restrict everywhere it's required by c99 and/or posix 2008</title>
<updated>2012-09-07T02:44:55+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-07T02:44:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=400c5e5c8307a2ebe44ef1f203f5a15669f20347'/>
<id>400c5e5c8307a2ebe44ef1f203f5a15669f20347</id>
<content type='text'>
to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove dependency of wmemmove on wmemcpy direction</title>
<updated>2012-09-07T00:28:42+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-07T00:28:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=bac03cdde1137c16b4c194e137310e2748661dcc'/>
<id>bac03cdde1137c16b4c194e137310e2748661dcc</id>
<content type='text'>
unlike the memmove commit, this one should be fine to leave in place.
wmemmove is not performance-critical, and even if it were, it's
already copying whole 32-bit words at a time instead of bytes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
unlike the memmove commit, this one should be fine to leave in place.
wmemmove is not performance-critical, and even if it were, it's
already copying whole 32-bit words at a time instead of bytes.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove dependency of memmove on memcpy direction</title>
<updated>2012-09-07T00:25:48+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-07T00:25:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=594318fd3d13c7dda1ea87a76934e052ac74301f'/>
<id>594318fd3d13c7dda1ea87a76934e052ac74301f</id>
<content type='text'>
this commit introduces a performance regression in many uses of
memmove, which will need to be addressed before the next release. i'm
making it as a temporary measure so that the restrict patch can be
committed without invoking undefined behavior when memmove calls
memcpy with overlapping regions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this commit introduces a performance regression in many uses of
memmove, which will need to be addressed before the next release. i'm
making it as a temporary measure so that the restrict patch can be
committed without invoking undefined behavior when memmove calls
memcpy with overlapping regions.
</pre>
</div>
</content>
</entry>
<entry>
<title>memcpy asm for i386 and x86_64</title>
<updated>2012-08-12T01:33:13+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-08-12T01:33:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=aaa9eb5101e3a748218fb9373dd9655b50582da2'/>
<id>aaa9eb5101e3a748218fb9373dd9655b50582da2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>remove unused but buggy code from strstr.c</title>
<updated>2012-08-11T22:40:33+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-08-11T22:40:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f997e224fc30361fe683c6b5d0ba39718043ca8d'/>
<id>f997e224fc30361fe683c6b5d0ba39718043ca8d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>remove buggy short-string wcsstr implementation; always use twoway</title>
<updated>2012-08-11T22:39:12+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-08-11T22:39:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=35c16933f03a3db49f3e2048759d850460c8a509'/>
<id>35c16933f03a3db49f3e2048759d850460c8a509</id>
<content type='text'>
since this interface is rarely used, it's probably best to lean
towards keeping code size down anyway. one-character needles will
still be found immediately by the initial wcschr call anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since this interface is rarely used, it's probably best to lean
towards keeping code size down anyway. one-character needles will
still be found immediately by the initial wcschr call anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>optimize mempcpy to minimize need for data saved across the call</title>
<updated>2012-08-01T01:18:17+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-08-01T01:18:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=970ef6a1240adfd685c27bf3407dfd06606a17e8'/>
<id>970ef6a1240adfd685c27bf3407dfd06606a17e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>make strerror_r behave nicer on failure</title>
<updated>2012-06-20T16:07:18+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-06-20T16:07:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f313a1622448de578ab0b11a881f44a02c9082e6'/>
<id>f313a1622448de578ab0b11a881f44a02c9082e6</id>
<content type='text'>
if the buffer is too short, at least return a partial string. this is
helpful if the caller is lazy and does not check for failure. care is
taken to avoid writing anything if the buffer length is zero, and to
always null-terminate when the buffer length is non-zero.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if the buffer is too short, at least return a partial string. this is
helpful if the caller is lazy and does not check for failure. care is
taken to avoid writing anything if the buffer length is zero, and to
always null-terminate when the buffer length is non-zero.
</pre>
</div>
</content>
</entry>
</feed>
