From 745224e04a03e4544c58d5d38d3c54f67100f8eb Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 18 Jun 2014 01:54:42 -0400 Subject: refs.c: SSE2 optimizations for check_refname_component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Optimize check_refname_component using SSE2 on x86_64. git rev-parse HEAD is a good test-case for this, since it does almost nothing except parse refs. For one particular repo with about 60k refs, almost all packed, the timings are: Look up table: 29 ms SSE2: 23 ms This cuts about 20% off of the runtime. Ondřej Bílka suggested an SSE2 approach to the substring searches, which netted a speed boost over the SSE4.2 code I had initially written. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- t/valgrind/default.supp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 't/valgrind') diff --git a/t/valgrind/default.supp b/t/valgrind/default.supp index 0a6724fcc4..332ab1a3b3 100644 --- a/t/valgrind/default.supp +++ b/t/valgrind/default.supp @@ -49,3 +49,11 @@ Memcheck:Addr4 fun:copy_ref } +{ + ignore-sse-check_refname_format + Memcheck:Addr8 + fun:check_refname_format + fun:cmd_check_ref_format + fun:handle_builtin + fun:main +} -- cgit v1.2.3