Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj32H-0006ej-EG for pgsql-performance@arkaria.postgresql.org; Fri, 05 Nov 2021 17:29:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mj32G-0001tu-B3 for pgsql-performance@arkaria.postgresql.org; Fri, 05 Nov 2021 17:29:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj32F-0001tk-Mo for pgsql-performance@lists.postgresql.org; Fri, 05 Nov 2021 17:29:52 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mj327-0006d8-8P for pgsql-performance@lists.postgresql.org; Fri, 05 Nov 2021 17:29:51 +0000 Received: by mail-ed1-x531.google.com with SMTP id x15so4315197edv.1 for ; Fri, 05 Nov 2021 10:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=EG0ttpt7Ld//GKk8bRLZD1ZsCnQYiikShMx7U2HbNDY=; b=csSTcLRi6LcVq0E06MBc2qovl2a4831RD8PC7BUvu1l3Jvy2ARcM7IFUkM4TCPgEd9 UMJGcLARzAECo+BqbGSdQcz3wnXsl6FbJhAx0dTP4gBdLUyx/Mq5DPfmoWGDMm4za4+g dPJfW8uWR4nOIWsN7cxNYDIrrLYknEZoDINn0aKJk3XT+FeMgjKGDmc7WonNi+DtLDbK Txn3RYA76wLSCbsY1Dzm8JY57v+gWZQ0gWv8YxQ7gvmXBC9Ee5/EfUEFwSBJGffD0ASI kpnsoETaZoFlROUtsRbS5QZ+evTqRtAbABMBdrFsEBu/O/frwEj2E2Smr9Tp2kKAfBTE ivJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=EG0ttpt7Ld//GKk8bRLZD1ZsCnQYiikShMx7U2HbNDY=; b=LJCo1va0hX/q/0ynbntxa0RcQhX74UlgZTztqw/schQrQg7VP1lla6/nvVrlpzglu2 3MdgNBRQZL3WX/Gv/+zVUou7wNXJ1hY2W4xqSRftrkgSGFk6bh7/g1D/v78VKxXC53ZV 8d7inONViTv1M8GIl5KhtvHmZ6DDzFhy4hpwkdwuTTP9+KRmxjtyBJHxjDb1fNhVS7yi kiUG6YwfIjQG1lGDKEbg/sGgUdXcNNkhUdLWae77jtyp4Ydr382s6tQCNVLhffhhfxa1 CfJGPwlxoA39rKZ3qKPuW/ClbSgmLNXzeF5B4Mw2IDAwCNAEvFZj+hj1VyEwgcGNzJz6 S4Rw== X-Gm-Message-State: AOAM531J6VYVuxL7NcG3tAJIAQlrnOFuk4CXqN5EGuebetgLtzHjelZ6 zZ+03KGfrNUId5Pzn/ob9/xw/e4rdgrMQ0vjnmLZK4QRPFepBiiu+ORSyUXrhmGwyqoH1y8nMui SVJhavv0rx/9dcsbmllGKI237OkC9oNrVp5LQ4s3V4EUHpnQeyxnIkKmDW8wnWUakv+wHPuovnW KQvmbzfP2c5NGm0H3dSUtsvUwnl+xYpy8B+70ShphCjCWzquH11BpCY4VLSQMiO/g= X-Google-Smtp-Source: ABdhPJyFdgRjkTU1CEjN4K0jyfk6a9c8HMHLEhFscjrxr1+ChP69AlJd5yAk4AVtll7vIvoctjqPJA== X-Received: by 2002:a17:906:3385:: with SMTP id v5mr30564093eja.45.1636133381358; Fri, 05 Nov 2021 10:29:41 -0700 (PDT) Received: from [10.137.0.18] (ip-86-49-251-104.net.upcbroadband.cz. [86.49.251.104]) by smtp.gmail.com with ESMTPSA id u23sm4778185edr.97.2021.11.05.10.29.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Nov 2021 10:29:41 -0700 (PDT) Message-ID: <69584b92-7405-8d65-adb5-175439b3f95e@enterprisedb.com> Date: Fri, 5 Nov 2021 18:29:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: PostgreSQLv14 TPC-H performance GCC vs Clang Content-Language: en-US To: arjun shetty , Imre Samu Cc: "pgsql-performance@lists.postgresql.org" References: From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, IMO this thread provides so little information it's almost impossible to answer the question. There's almost no information about the hardware, scale of the test, configuration of the Postgres instance, the exact build flags, differences in generated asm code, etc. I find it hard to believe merely switching from clang to gcc yields 22% speedup - that's way higher than any differences we've seen in the past. In my experience, the speedup is unlikely to be "across the board". There will be a handful of affected queries, while most remaining queries will be about the same. In that case you need to focus on those queries, see if the plans are the same, do some profiling, etc. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company