]> git.draconx.ca Git - cdecl99.git/commit
libcdecl: Prefer memchr over strchr in the scanner.
authorNick Bowler <nbowler@draconx.ca>
Sun, 19 Nov 2023 01:05:23 +0000 (20:05 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 19 Nov 2023 01:07:10 +0000 (20:07 -0500)
commit82cedba63a97c4afde1440751585759888384883
treed4117c5cac235f970b9aea431df086868e214418
parenteda9528293fbc32857a5856a30ebd6585b281215
libcdecl: Prefer memchr over strchr in the scanner.

Since nothing else in the library uses strchr, but we do use memchr
elsewhere, using memchr instead avoids a comparatively expensive PLT
entry.  We already know the string length so the only real difference
is the additional argument marshalling.
src/scan.l