Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH V2 4/5] git-grep: Learn PCRE

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:10

Bert Wesarg [off-list ref] writes:
I would also suggest to share the space between regex_t and the
(pcre*,pcre_extra*) tuple, like i did in my patch titled 'prepare for
re-using the space...' from May 2. Sacrificing one bit to indicate
that this is a pcre compiled pattern should not hurt, because there
are bits left.
It might be an excessive over-engineering, though.

Unlike "struct object" that need to stay in-core and grow proportionally
to the size of the history being traversed, grep_pat corresponds to one
item from the pattern specified on the command line. If it makes the code
harder to read because we end up constantly dereferencing union members
(and no, "#define pcre_regexp u.pcre_regexp" is not a solution), the
resulting 8-to-16 bytes saved per pattern may not be worth it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help