]> git.ipfire.org Git - thirdparty/make.git/commit
Use strchr/memmove in collapse_continuations.
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 Aug 2017 11:44:30 +0000 (13:44 +0200)
committerPaul Smith <psmith@gnu.org>
Sat, 11 Nov 2017 14:37:55 +0000 (09:37 -0500)
commitef7a1b7d6e276b0c3a08c28fbfab7752704cb20c
treef18563d47e2282f7199da58e1b4e9227a5cdf3b9
parent0c5a9f9b92af1634dc60fa21e9ac86ed50e5d595
Use strchr/memmove in collapse_continuations.

collapse_continuations is already using strchr to speed up the
common case of no backslash-newline sequence, but on modern
processors it is faster to scan the string twice with
strchr+memmove (or strlen+memmove) than to move bytes manually.

Saves about 1.5% on QEMU's no-op build (from 11.37s to 11.23s).

* misc.c (collapse_continuations): Rewrite the scanning of LINE.
misc.c