git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] [GSOC] [RFC] ref-filter: code logic optimization
@ 2021-08-17  8:41 ZheNing Hu via GitGitGadget
  2021-08-17  8:41 ` [PATCH 1/8] [GSOC] ref-filter: remove grab_oid() function ZheNing Hu via GitGitGadget
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ZheNing Hu via GitGitGadget @ 2021-08-17  8:41 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Christian Couder, Hariom Verma, Bagas Sanjaya,
	Jeff King, Ævar Arnfjörð Bjarmason, Eric Sunshine,
	Philip Oakley, ZheNing Hu

Last time I submitted a very long patch series:
https://lore.kernel.org/git/pull.1016.git.1628842990.gitgitgadget@gmail.com/
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
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-17  8:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-17  8:41 [PATCH 0/8] [GSOC] [RFC] ref-filter: code logic optimization ZheNing Hu via GitGitGadget
2021-08-17  8:41 ` [PATCH 1/8] [GSOC] ref-filter: remove grab_oid() function ZheNing Hu via GitGitGadget
2021-08-17  8:41 ` [PATCH 2/8] [GSOC] ref-filter: merge two for loop in grab_person ZheNing Hu via GitGitGadget
2021-08-17  8:41 ` [PATCH 3/8] [GSOC] ref-filter: remove strlen from find_subpos ZheNing Hu via GitGitGadget
2021-08-17  8:41 ` [PATCH 4/8] [GSOC] ref-filter: introducing xstrvfmt_len() and xstrfmt_len() ZheNing Hu via GitGitGadget
2021-08-17  8:41 ` [PATCH 5/8] [GSOC] ref-filter: introduction ref_filter_slopbuf[1] ZheNing Hu via GitGitGadget
2021-08-17  8:41 ` [PATCH 6/8] [GSOC] ref-filter: add deref member to struct used_atom ZheNing Hu via GitGitGadget
2021-08-17  8:41 ` [PATCH 7/8] [GSOC] ref-filter: introduce symref_atom_parser() ZheNing Hu via GitGitGadget
2021-08-17  8:41 ` [PATCH 8/8] [GSOC] ref-filter: use switch/case instead of if/else ZheNing Hu via GitGitGadget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).