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

Re: free and errno, was Re: [PATCH] apply: replace mksnpath() with a mkpathdup() call

From
Jeff King <peff@peff.net>
Date
Apr 5, 2024, 17:41 UTC
Message-ID
<20240405174136.GC2529133@coredump.intra.peff.net>
In-Reply-To
<20240405173517.GA2529133@coredump.intra.peff.net>
On Fri, Apr 05, 2024 at 01:35:17PM -0400, Jeff King wrote:
Show 6 quoted lines
> With the patch below you can see both in action:
> 
>   - hyperfine seems to show the git_free() version as ~1% slower to run
>     "git log" (which I picked as something that probably does a
>     reasonable number of mallocs). Frankly, I'm still suspicious that it
>     could have such an impact. Maybe inlining git_free() would help?

This may have been noise. Weirdly it seemed consistent from run to run using hyperfine. But switching my CPU governor from "powersave" to "performance", I got a run where the new code is fast.

-Peff
Previous: Jeff KingNext: René Scharfe
Message 7 of 15 in “apply: replace mksnpath() with a mkpathdup() call”
  1. apply: replace mksnpath() with a mkpathdup() callRené Scharfe, Apr 4, 2024
  2. Junio C HamanoApr 4, 2024
  3. free and errno, was Re: [PATCH] apply: replace mksnpath() with a mkpathdup() callJeff King, Apr 4, 2024
  4. Junio C HamanoApr 4, 2024
  5. René ScharfeApr 5, 2024
  6. Jeff KingApr 5, 2024
  7. Jeff KingApr 5, 2024
  8. René ScharfeApr 6, 2024
  9. Jeff KingApr 7, 2024
  10. René ScharfeApr 14, 2024
  11. Jeff KingApr 24, 2024
  12. 1/2 apply: avoid fixed-size buffer in create_one_file()René Scharfe, Apr 5, 2024
  13. 2/2 path: remove mksnpath()René Scharfe, Apr 5, 2024
  14. Jeff KingApr 5, 2024
  15. Junio C HamanoApr 5, 2024

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.