submodule: rewrite `module_name` shell function in C
authorStefan Beller <sbeller@google.com>
Wed, 2 Sep 2015 21:42:25 +0000 (14:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Sep 2015 21:12:40 +0000 (14:12 -0700)
This implements the helper `name` in C instead of shell,
yielding a nice performance boost.

Before this patch, I measured a time (best out of three):

$ time ./t7400-submodule-basic.sh >/dev/null
real 0m11.066s
user 0m3.348s
sys 0m8.534s

With this patch applied I measured (also best out of three)

$ time ./t7400-submodule-basic.sh >/dev/null
real 0m10.063s
user 0m3.044s
sys 0m7.487s

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found