Paul's Blog Google Summer of Code 2018

Week 14

Hello,

This is the last week of Google Summer of Code and you might wonder how is the project going. Well, we have the following stats:

In order to see the difference between the shell version and the C version, I runned time on:

LINUX (ubuntu):

* git test suite (t3903-stash.sh, t3904-stash-patch.sh,
t3905-stash-include-untracked.sh and t3906-stash-submodule.sh)

        t3903-stash.sh:
        ** SHELL: 12,69s user 9,95s system 109% cpu 20,730 total
        **     C:  2,67s user 2,84s system 105% cpu  5,206 total

        t3904-stash-patch.sh:
        ** SHELL: 1,43s user 0,94s system 106% cpu 2,242 total
        **     C: 1,01s user 0,58s system 104% cpu 1,530 total

        t3905-stash-include-untracked.sh
        ** SHELL: 2,22s user 1,73s system 110% cpu 3,569 total
        **     C: 0,59s user 0,57s system 106% cpu 1,085 total

        t3906-stash-submodule.sh
        ** SHELL: 2,89s user 2,99s system 106% cpu 5,527 total
        **     C: 2,21s user 2,61s system 105% cpu 4,568 total

        TOTAL:
        ** SHELL: 19.23s user 15.61s system
        **     C:  6.48s user  6.60s system

* a git repository with 4000 files: 1000 not changed,
1000 staged files, 1000 unstaged files, 1000 untracked.
In this case I ran some of the most used commands:

        git stash push:

        ** SHELL: 0,12s user 0,21s system 101% cpu 0,329 total
        **     C: 0,06s user 0,13s system 105% cpu 0,185 total

        git stash push -u:

        ** SHELL: 0,18s user 0,27s system  108% cpu 0,401 total
        **     C: 0,09s user 0,19s system  103% cpu 0,267 total

        git stash pop:

        ** SHELL: 0,16s user 0,26s system 103% cpu 0,399 total
        **     C: 0,13s user 0,19s system 102% cpu 0,308 total


Windows 8.1:

* git test suite (t3903-stash.sh, t3904-stash-patch.sh,
t3905-stash-include-untracked.sh and t3906-stash-submodule.sh)

        TOTAL:
        ** SHELL: 17m20.407s
        **    C:   5m 6.967s

        =================================

        t3903-stash.sh:
        ** SHELL:
        real    11m28.043s
        user    0m11.042s
        sys     0m24.278s

        ** C:
        real    1m56.922s
        user    0m11.725s
        sys     0m25.462s

        ================================

        t3904-stash-patch.sh:
        ** SHELL:
        real    0m35.436s
        user    0m1.117s
        sys     0m2.669s

        ** C:
        real    0m32.015s
        user    0m2.346s
        sys     0m5.151s

        ================================

        t3905-stash-include-untracked.sh
        ** SHELL:
        real    2m11.608s
        user    0m2.482s
        sys     0m4.737s

        ** C:
        real    0m24.749s
        user    0m2.171s
        sys     0m5.060s

        =================================

        t3906-stash-submodule.sh
        ** SHELL:
        real    3m5.032s
        user    0m7.563s
        sys     0m21.697s

        ** C:
        real    2m13.281s
        user    0m8.644s
        sys     0m20.799s

The code can be found on:

  • Github repo: https://github.com/ungps/git/tree/git-stash

  • Github PR: https://github.com/git/git/pull/495

  • Mailing list https://public-inbox.org/git/20180405022810.15796-1-joel@teichroeb.net/T/#mb30ec76d51113efbbd5dc10528c871acc8af06c9

Thanks, Paul