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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]