From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 12DC33858D1E; Wed, 3 May 2023 02:17:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 12DC33858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-63b4bf2d74aso3275206b3a.2; Tue, 02 May 2023 19:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683080246; x=1685672246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W7GDjvk3IIig/WCC7ZJ7ZW3zr7FhMQdBj9MnCmK0dD8=; b=PvAAp7AbrZJiPQr6jiB+3r/QnZjR4b1IGGVtsAiQGG312M0R5zxm12Qkh8wjabHTTB s/+0OgyX4hDjblD1Jm3XimWyhAEpxjC1s5PS7BTb0V+un0pRFGM3JbAmJbnaUYhTfpFL oJ/kGpzJFu7xUI/rX4OAbM4WaZT9/luh6yIzM1QcpMBhq2fT3Twyuxqb6k+WfS4nREL+ 7NdShe7foNOMqFHD72bvW+ce94WbqLBG3qbDNPVNwNim0OWTpmLFLwApQv4lFzc+NTIw fcMl5Ger6+BPtuOvW7ivZ/EKI+tFEQQktLBA1mZBjTZCB7TFnMUzNwlBLZi2itWEkW+z WK0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683080246; x=1685672246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W7GDjvk3IIig/WCC7ZJ7ZW3zr7FhMQdBj9MnCmK0dD8=; b=HWwMh21irfzGus3R2MpsWjb0ceQe+I9/knTvRf6CsHseTa0e8htACDd3a2+zBisw1i IeGNBr+XgEcBwdWZ5/YtTR6GtQ76XRn0ICElvp26IeeP77HBfqV7AoEMOSurf/9W7AWv ESzztyN0NfsXGKVFc9v75g/9KWgMbEkc7Lzr+ygAl7ZSHEPGuIl9vgSGOKxWWygGOxIV l2HCvZqQQNZbi4AEr/YzE6P+BNz1/rmq8kzuxnibMnwP2dAzUkYM+wkNP4kigY6r9CCj 2rrxgF463YUgKFefsChKg5mX1S4iOn+rZPXwAruOBi/udBohT/brKoQ2K5InzW7IQKdm c9bg== X-Gm-Message-State: AC+VfDzjM1PQOOiFCGbmku8Sy8UfgxAe0dCnUsB0EuR6pQmeDklCCvaT Gd7a1hDGu5rq1WR4Gn9VriiXYSwA4Nm//A== X-Google-Smtp-Source: ACHHUZ4mnhCuMkpQqrvaZlBAokmSA8u++XG5lwfn0Tc7BAIi4hyjb6p6r/w11rqGrWOp61HMSZtXLg== X-Received: by 2002:a05:6a00:848:b0:63b:7af1:47c9 with SMTP id q8-20020a056a00084800b0063b7af147c9mr30500681pfk.13.1683080245582; Tue, 02 May 2023 19:17:25 -0700 (PDT) Received: from localhost.localdomain ([101.93.160.94]) by smtp.gmail.com with ESMTPSA id a15-20020a056a000c8f00b0063b8ddf77f7sm22452912pfv.211.2023.05.02.19.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 19:17:25 -0700 (PDT) From: Kefu Chai To: libstdc++@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org, Kefu Chai Subject: [PATCH v2 0/1] Set _M_string_length before calling _M_dispose() Date: Wed, 3 May 2023 10:17:12 +0800 Message-Id: <20230503021713.1146069-1-tchaikov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230501070622.847749-2-tchaikov@gmail.com> References: <20230501070622.847749-2-tchaikov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_ABUSEAT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Jonathan, Thank you for your review and suggestion. The change looks great! Assigning a value with an immediate zero is indeed much faster. in v2: * revised the commit message a little bit, I found it a little bit difficult to parse when re-reading it. * associated the commit with PR/libstdc++/109703. as I just filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109706, which turns out to be a dup of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109703 The rest of the v2 patch is identical to the one attached in your reply. Would you please taking another look? Kefu Chai (1): libstdc++: Set _M_string_length before calling _M_dispose() [PR109703] libstdc++-v3/include/bits/basic_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.40.1