Skip to content

RFC ref-filter: code logic optimization

ZheNing Hu via GitGitGadget git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 0 repliesNew

Changes in this patch series from the cover letter

1. Remove grab_oid to reduce unnecessary string comparison.
2. Use atom_type in grab_person() and merge the two for loops.
3. Remove strlen() and introducing xstrvfmt_len() and xstrfmt_len() to reduce strlen() overhead.
4. Introduction ref_filter_slopbuf[1] to reduce memory allocation.
5. Add deref to struct used_atom to increase the readability of the code.
6. Introduction symref_atom_parser() to increase the readability of the code.
7. Use switch/case instread of if/else to increase the readability of the code.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ref-filter: remove grab_oid() functionref-filter.c+9 -170 replies
2/8ref-filter: merge two for loop in grab_personref-filter.c+18 -390 replies
3/8ref-filter: remove strlen from find_subposref-filter.c+6 -60 replies
4/8ref-filter: introducing xstrvfmt_len() and xstrfmt_len()ref-filter.c+48 -250 replies
5/8ref-filter: introduction ref_filter_slopbuf[1]ref-filter.c+27 -260 replies
6/8ref-filter: add deref member to struct used_atomref-filter.c+21 -340 replies
7/8ref-filter: introduce symref_atom_parser()ref-filter.c+8 -30 replies
8/8ref-filter: use switch/case instead of if/elseref-filter.c+109 -540 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by.

PatchChristian CouderHariom Verma
1/8Mentored-by Mentored-by
2/8Mentored-by Mentored-by
3/8Mentored-by Mentored-by
4/8Mentored-by Mentored-by
5/8Mentored-by Mentored-by
6/8Mentored-by Mentored-by
7/8Mentored-by Mentored-by
8/8Mentored-by Mentored-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] [GSOC] [RFC] ref-filter: code logic optimization

Last time I submitted a very long patch series:
https://lore.kernel.org/git/[email protected]/
My mentor Christian suggested to split the performance optimization part out, so this patch series used to optimize code logic in ref-filter.

Changes in this patch series:

1. Remove grab_oid to reduce unnecessary string comparison.
2. Use atom_type in grab_person() and merge the two for loops.
3. Remove strlen() and introducing xstrvfmt_len() and xstrfmt_len() to reduce strlen() overhead.
4. Introduction ref_filter_slopbuf[1] to reduce memory allocation.
5. Add deref to struct used_atom to increase the readability of the code.
6. Introduction symref_atom_parser() to increase the readability of the code.
7. Use switch/case instread of if/else to increase the readability of the code.

ZheNing Hu (8):
[GSOC] ref-filter: remove grab_oid() function
[GSOC] ref-filter: merge two for loop in grab_person [GSOC] ref-filter: remove strlen from find_subpos [GSOC] ref-filter: introducing xstrvfmt_len() and xstrfmt_len() [GSOC] ref-filter: introduction ref_filter_slopbuf[1] [GSOC] ref-filter: add deref member to struct used_atom [GSOC] ref-filter: introduce symref_atom_parser() [GSOC] ref-filter: use switch/case instead of if/else

 ref-filter.c | 432 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 237 insertions(+), 195 deletions(-)

base-commit: f000ecbed922c727382651490e75014f003c89ca
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1021%2Fadlternative%2Fref-filter-opt-code-logic-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1021/adlternative/ref-filter-opt-code-logic-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1021

Signature · 1 line
gitgitgadget