RFC ref-filter: code logic optimization
Get series with b4
b4 am [email protected]Versions newest first
- 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 files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | ref-filter: remove grab_oid() functionref-filter.c | +9 | 0 replies | |
| 2/8 | ref-filter: merge two for loop in grab_personref-filter.c | +18 | 0 replies | |
| 3/8 | ref-filter: remove strlen from find_subposref-filter.c | +6 | 0 replies | |
| 4/8 | ref-filter: introducing xstrvfmt_len() and xstrfmt_len()ref-filter.c | +48 | 0 replies | |
| 5/8 | ref-filter: introduction ref_filter_slopbuf[1]ref-filter.c | +27 | 0 replies | |
| 6/8 | ref-filter: add deref member to struct used_atomref-filter.c | +21 | 0 replies | |
| 7/8 | ref-filter: introduce symref_atom_parser()ref-filter.c | +8 | 0 replies | |
| 8/8 | ref-filter: use switch/case instead of if/elseref-filter.c | +109 | 0 replies |
Reviews trailers per patch
None of the 8 patches has a Reviewed-by or Acked-by.
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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