git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/3] merge-recursive: replace string_list with hashmap

From
KWKevin Willford <kewillf@microsoft.com>
Date
Aug 28, 2017, 20:28 UTC
Message-ID
<20170828202829.3056-1-kewillf@microsoft.com>

Code was using two string_lists, one for the directories and one for the files. The code never checks the lists independently so we should be able to only use one list. The string_list also is a O(log n) for lookup and insertion. Switching this to use a hashmap will give O(1) which will save some time when there are millions of paths that will be checked.

Also cleaned up a memory leak and method where the return was not being used.

Kevin Willford (3):
  merge-recursive: fix memory leak
  merge-recursive: remove return value from get_files_dirs
  merge-recursive: change current file dir string_lists to hashmap
 merge-recursive.c | 68 +++++++++++++++++++++++++++++++++++++++----------------
 merge-recursive.h |  3 +--
 2 files changed, 49 insertions(+), 22 deletions(-)
-- 
2.14.1.329.g6edf0add19
Next: Kevin Willford
Message 1 of 15 in “merge-recursive: replace string_list with hashmap”
  1. 0/3 merge-recursive: replace string_list with hashmapKevin Willford, Aug 28, 2017
  2. 1/3 merge-recursive: fix memory leakKevin Willford, Aug 28, 2017
  3. Ben PeartAug 28, 2017
  4. Jeff KingAug 29, 2017
  5. 2/3 merge-recursive: remove return value from get_files_dirsKevin Willford, Aug 28, 2017
  6. Ben PeartAug 28, 2017
  7. Jeff KingAug 29, 2017
  8. Jeff KingAug 29, 2017
  9. Kevin WillfordAug 29, 2017
  10. Jeff KingAug 29, 2017
  11. Stefan BellerAug 31, 2017
  12. 3/3 merge-recursive: change current file dir string_lists to hashmapKevin Willford, Aug 28, 2017
  13. Ben PeartAug 28, 2017
  14. Jeff KingAug 29, 2017
  15. Junio C HamanoSep 6, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.