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

[PATCH 0/2] Make stash a builtin

From
Matthias Aßhauer <mha1993@live.de>
Date
Jan 28, 2016, 19:38 UTC
Message-ID
<BLU436-SMTP27D65F59A444FA678FFD8AA5DA0@phx.gbl>

These are the first two Patches in an upcomming series of Patches to convert git stash into a builtin command. This is mainly based on the general performance of scripts running inside an interpreter (bash in this case) running inside a POSIX emulation layer on Windows. Shell, perl and python scripts are generaly a lot faster on Unix-like systems compared to Windows systems. That does not mean that Unix-like systems won't benefit from more native Git commands, but the effect is bigger on Git for Windows.

These two patches port over the core non-patch part of git-stash into native code using a separate helper command. This helper command is intended as a temporary meassure and as such it's subject to change. For this reason, I did not implement new regression tests, documentation or localizations for this command.

I meassured the changes in excecution time for the stash related regression tests on the same hardware running Windows 8.1 and Kubuntu 15.10. Each result is the difference between the average of five meassurements (six on Linux, because I lost count on the first run of meassurements) each before and after these changes. I meassured the following changes:

Windows:

t3903 real -5,10% user -0,94% sys +0,16% (10ms)

t3904 real -0,30% user -2,98% (20ms) sys +5,03%

t3905 real -4,03% user -8,13% sys +17,42%

t3906 real -2,57% user +1,94% sys +1,59%

Linux:

t3903 real +0,63% user +10,87% (3ms) sys +4,29% (4ms)

t3904 real -7,29% user -30,61% sys +5,77% (4ms)

t3905 real -7,29% user -33,33% (2ms) sys +20% (2ms)

t3906 real -0,88% user -1,08% (1ms) sys -2,22%

I added the asolute times where I think the difference is below the meassurement precission (4ms on Linux) and on the two lowest absolute differences on windows. A full log of all meassurement runs is available at https://gist.github.com/rimrul/82adf3b368ed633263d2. Please note that according to Johannes Schindelin, maintainer of Git for Windows, the meassuring of sys time on Windows is unreliable. With that in mind, in summary this is a slight increase in performance on Linux, and a more noticeable increase on Windows.

Message 1 of 1 in “Make stash a builtin”
  1. 0/2 Make stash a builtinMatthias Aßhauer, Jan 28, 2016

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.