From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM, RP_MATCHES_RCVD shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id F237D1FF34 for ; Thu, 11 May 2017 09:19:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755273AbdEKJTs (ORCPT ); Thu, 11 May 2017 05:19:48 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34909 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755253AbdEKJTn (ORCPT ); Thu, 11 May 2017 05:19:43 -0400 Received: by mail-wr0-f195.google.com with SMTP id g12so2623831wrg.2 for ; Thu, 11 May 2017 02:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iKLNqbzOxVVpQYplXUwcw3CRUSRvUwwHkwv/uc897K8=; b=QN409+zpG8Exvmoe/DsGTNjyhtyJp7i6QUrO6IuvkgTTMBJLiO5CSZNllY1QbfheEs 9P2QPled3jtGiIDnuf8E4wAyluN1TtA9kEmiUDjhd08++2J0y34+0cfJQavkbWfeFWMG IEbyL0CW1R+vYKrsbrujqNluHJFdjwRtGrrU3a44kGce9U4kH5tDLIaP06SInIuGH5Va Yuy5hWQ09lOoDBwxjZIO4UlChMvdIX0l5GO5zVlDzAzAZy1S6Ihfg5NKlB1sy83cIriK VU1ZeJLhZNX4eMXEbQaazXieniZhXDLqMYjn9YEwZv09BIx/W+JmfKhIICE3TEALiOk4 yExw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iKLNqbzOxVVpQYplXUwcw3CRUSRvUwwHkwv/uc897K8=; b=oZOmp6KOuKMeY+QkbvH9JK7QRn9nMrNV4UqUYJGvHJoAK8AuyT9PDmKRAv865vjppJ irJEsARXG5zevLbfTQ3v7+zzCh1Ot860g+cQgHGVL5DyXrF6aj+vRKp8H8PyqfqDTPpS x97plcMvKWIiATN0LwAym64jNGiMOMW4UBaq+YI/mRQ26VaY0y9Zqw4qaCeZ+M4+aRlc AYoffUhWf9mQlnziwooNYO7gZjF04TIAB2o9aOuezHX14FAgjus4pYMUEI6/0o7aF3XW tMH1jrS1+T4NiKIRDWZN5EVtKFjXt/4HWCfXXnr8L5bT/o5PUISA8abeuiSFzOvtBEMr I87Q== X-Gm-Message-State: AODbwcCGH3U/j7DeiPM8LB1O7/sNDjJDsBQRA4haVruWpCPuOd/Xc7Pe XCOUq/WhjedQEg== X-Received: by 10.80.175.195 with SMTP id h61mr7454154edd.167.1494494377120; Thu, 11 May 2017 02:19:37 -0700 (PDT) Received: from u.nix.is ([2a01:4f8:190:5095::2]) by smtp.gmail.com with ESMTPSA id b3sm8341ede.9.2017.05.11.02.19.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 02:19:36 -0700 (PDT) From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Jeffrey Walton , =?UTF-8?q?Micha=C5=82=20Kiedrowicz?= , J Smith , Victor Leschuk , =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= , Fredrik Kuivinen , Brandon Williams , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Subject: [PATCH 17/29] perf: add a performance comparison of fixed-string grep Date: Thu, 11 May 2017 09:18:17 +0000 Message-Id: <20170511091829.5634-18-avarab@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170511091829.5634-1-avarab@gmail.com> References: <20170511091829.5634-1-avarab@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add a performance comparison test which compares both case-sensitive & case-insensitive fixed-string grep, as well as non-ASCII case-sensitive & case-insensitive grep. Currently only the "-i æ" performance test doesn't go through the same kwset.[ch] codepath, see the "Even when -F..." comment in grep.c. $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux ./run p7821-grep-engines-fixed.sh ---------------------------------------------- 7821.1: fixed grep int 1.75(1.39+0.34) 7821.2: basic grep int 1.68(1.38+0.28) 7821.3: extended grep int 1.75(1.41+0.29) 7821.4: perl grep int 1.73(1.40+0.30) 7821.6: fixed grep -i int 1.94(1.54+0.35) 7821.7: basic grep -i int 1.92(1.57+0.32) 7821.8: extended grep -i int 1.90(1.54+0.30) 7821.9: perl grep -i int 1.91(1.53+0.36) 7821.11: fixed grep æ 1.35(1.14+0.18) 7821.12: basic grep æ 1.34(1.16+0.16) 7821.13: extended grep æ 1.33(1.15+0.17) 7821.14: perl grep æ 1.35(1.12+0.20) 7821.16: fixed grep -i æ 0.72(0.49+0.22) 7821.17: basic grep -i æ 0.74(0.49+0.21) 7821.18: extended grep -i æ 0.72(0.48+0.22) 7821.19: perl grep -i æ 0.71(0.44+0.23) I'm planning to make that not be the case, this performance test gives a baseline for comparing performance before & after any such change. See commit ("perf: add a performance comparison test of grep -G, -E and -P", 2017-04-19) for details on the machine the above test run was executed on. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/perf/p7821-grep-engines-fixed.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 t/perf/p7821-grep-engines-fixed.sh diff --git a/t/perf/p7821-grep-engines-fixed.sh b/t/perf/p7821-grep-engines-fixed.sh new file mode 100755 index 0000000000..66a78d225d --- /dev/null +++ b/t/perf/p7821-grep-engines-fixed.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +test_description="Comparison of fixed string grep under git-grep's regex engines" + +. ./perf-lib.sh + +test_perf_large_repo +test_checkout_worktree + +for args in 'int' '-i int' 'æ' '-i æ' +do + for engine in fixed basic extended perl + do + test_perf "$engine grep $args" " + git -c grep.patternType=$engine grep $args >'out.$engine.$args' || : + " + done + + test_expect_success "assert that all engines found the same for $args" " + test_cmp 'out.fixed.$args' 'out.basic.$args' && + test_cmp 'out.fixed.$args' 'out.extended.$args' && + test_cmp 'out.fixed.$args' 'out.extended.$args' && + test_cmp 'out.fixed.$args' 'out.perl.$args' + " +done + +test_done -- 2.11.0