[darcs-users] darcs patch: fpstring.c: switch a memchr for memrchr (and 2 more)
Gwern Branwen
gwern0 at gmail.com
Mon Apr 28 22:04:18 UTC 2008
On 2008.04.28 14:46:48 -0700, Jason Dagit <dagit at codersbase.com> scribbled 2.0K characters:
> On Mon, Apr 28, 2008 at 2:05 PM, <gwern0 at gmail.com> wrote:
>
> Fri Apr 25 16:01:53 EDT 2008 gwern0 at gmail.com
> * fpstring.c: switch a memchr for memrchr
> See <http://bugs.darcs.net/issue814>; memrchr speeds up is_funky quite a bit and thus helps
> whatsnew -s. It doesn't seem to break (any more) tests.
>
> Now that we're looking at less of the data does memrchr really provide a speed up? I'm also
> concerned about what Don Stewart said about the portability of memrchr. I don't see a
> portability fix included in your patch bundle. So, my recommendation would be to wait on the
> memrchr addition.
>
> The rest looks good.
> Jason
Oh, you misunderstand - the first patch changes it to memchr/memrchr, but the second one restores the status quo and simultaneously moves the 4096 truncation up the stack to is_bin. So if the bundle is applied, it'll still be memchr/memchr, as portable as usual.
If the patch is a null-op, then you might be forgiven for wondering why I included it. Well, two main reasons: it's nice to have a record of other ideas and approaches (eg. if someone wants to see how much of a difference memchr/memrchr would make now, they can just rollback a few patches), it's a very small patch, and I was too lazy to do whatever magic would be necessary to make the two important patches apply straight to the Darcs darcs repo without depending on't.
--
gwern
ASIO A/C undercover Audiotel Global domestic Internet Sayeret Canine Cap-Stun
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080428/033e192e/attachment.pgp
More information about the darcs-users
mailing list