From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 5A644396DC0A for ; Fri, 13 May 2022 18:16:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5A644396DC0A Received: by mail-wm1-x331.google.com with SMTP id m2-20020a1ca302000000b003943bc63f98so5162150wme.4 for ; Fri, 13 May 2022 11:16:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hj84OUICzsR59Ipj5DQfewAHR+MZjpjTx2OHCyl2Ssc=; b=4gUfV25xKbnA+R3ubMm/sWzbKYf1cvKSxzUEL5QZyTt+9EvtmRS6Sinpt5NEIbiXHq P/NTZ/AZNB2XB74sMqCujGfOn/a4ZoKuJYTVZOZJIKvR/gAJqAnq/8faqlAOHlQxc4Aj 1GEqowLQYoV5/utJ39Kr5gz9U4sOFKqNb2yNL+ya6vtSSOyIpohPZDMYJuSVyFSV/v20 kJaSmNGOWd631SxZbLF91dHX/gE300g16y7TjJ3GG4gIaeflHDWyAX4SGldxj1QenBf7 /KLhQElaiFT1J34bSC2QbeTgYM5tvHqtqx9pxxohcGfmDyRl6++75GUzvWDFhZiEZ/wd 7+Ig== X-Gm-Message-State: AOAM530NagDndsNyqri2qKe2AlgI8A+untvq5i/xqkU3/MboMdQJFhvg 4qeoK2C/6SifsDWS9r8v1vE7J3eOTig/CSIHAtw= X-Google-Smtp-Source: ABdhPJxffF15XTHVpdrLYVQBy/lqCwoUtZQX3iZLgWMwmaZLeCl3T75yUZZvvthx0RzePzX5an5a7UTOoFzLZzplByQ= X-Received: by 2002:a7b:c119:0:b0:393:f98e:b56e with SMTP id w25-20020a7bc119000000b00393f98eb56emr16174443wmi.128.1652465772006; Fri, 13 May 2022 11:16:12 -0700 (PDT) MIME-Version: 1.0 References: <7c754a932bd94cbf86fa20df7b611d2c@mentor.com> In-Reply-To: <7c754a932bd94cbf86fa20df7b611d2c@mentor.com> From: Jonathan Wakely Date: Fri, 13 May 2022 19:16:00 +0100 Message-ID: Subject: Re: compile time of code using long tuples To: "Foelsche, Peter" Cc: gcc-help X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2022 18:16:15 -0000 On Fri, 13 May 2022, 19:13 Foelsche, Peter, wrote: > I'm the author of some software which dumps out C++ code to be compiled > with g++. > This code sometimes contains many different and many long tuples. I > deduced that long tuples cause rather long compile times. > I already wrote some compression, which collects identical entries in such > a tuple and moves them into an array. > But this compression reduces (run-time) performance. > I already wrote different tuple implementations, and one of the compiles > much faster than the regular provided std::tuple. > What could be the criterium for such a tuple implementation, which makes > g++ take more or less compile time assuming the same code using this tuple? > Identical object layout on all targets, meaning size, alignment, base-class order, etc. It needs to be ABI-compatible.