From patchwork Thu Nov 23 21:58:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 1867982 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=QWbRTznK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SbsSX1S4Dz1yS0 for ; Fri, 24 Nov 2023 08:58:36 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B35F53858C5F for ; Thu, 23 Nov 2023 21:58:33 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 299E83858413; Thu, 23 Nov 2023 21:58:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 299E83858413 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 299E83858413 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700776692; cv=none; b=I10pmfy5+rh9h3xbDdi2B13L/IiROCRhh71ciu7d0G4CSrBoNJxe9nDh5PSmXfTn4fGQMolAZrCuyxoOljUmo6ZPrfo0KzMBTqndVGZdG22TgFQhZb3BVM7HVqWuFzsDAEf6PFEIrPWYMZdEmYMZE+jO9oRJsqGR9GUEk/agGr0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700776692; c=relaxed/simple; bh=B/4jYqfL5kcpoa36M7MLQW1GWk82giKOGRGkhR6MSI0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:From:Subject:To; b=JvNkVvb9IAEJQscLuJDqqLEduKbXWxl6KGdWPbQQ0dpi6agYGOBhb3bgJ1s932alDRD0eSPDl8cjCM6VLf+S36fR4606t9zsekrsm7lanl3nWrN3eVLf6fAEKby4LMLlWuXAoIMfSW7Y2RAwyWmIvceoXfOFvZLWMBU4sWYub4w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40b34563987so7639725e9.1; Thu, 23 Nov 2023 13:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700776689; x=1701381489; darn=gcc.gnu.org; h=content-transfer-encoding:content-language:cc:to:subject:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=xmmq0DvqJLcQvKKQFcIpm8wzYeCLayrgeZ2vtv9wUBM=; b=QWbRTznKa4JFy9nsxIz6ebxAwVdcFU5hX/5KeJKKBn/aLolxrvBwtWSDPtsQtjSQ+P XKXUFi5g+zQmm5zL+bL/xJM93pSYuRTrvpBS8yRiBmLjycNVZL/cej0HeUujd46+iUih pghjI6zrBjGwK1oVB77CzWu7dvMvsvx6jbwu09vdBM5FhidAShPVdD3f/mHTH07eZehU NiXE/Y0okcvbKJmhXr50exfe8zLIy5HFmkBeQBtVOnwm43kJ643JXsLBMfXbvhYizxcO tlUnei/MHTs0Do38WCL8+a7gYfPzmVLFB5lqp0RjFh77DZzoi2vWcIGK+tgBidVqMkqH yXEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700776689; x=1701381489; h=content-transfer-encoding:content-language:cc:to:subject:from :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=xmmq0DvqJLcQvKKQFcIpm8wzYeCLayrgeZ2vtv9wUBM=; b=aqGQzA7imn1X07cFHuheOlmEYGPbNRDMGUevceyImECfuNbbdoX7JiyGio35bUo7SN qkxEnfoVGKn92BUgndWo9sdwWJLt+ujfn3ytRJ8pwIoYRIkrb3DgZ9yuldpP9dhsj5Rx yRtQtmMAmYvOSVJZxYCSyeJI64M1OK9+JxgymyqhEFXLbgm5AVVRdQJNv0Jmn+jdpMjk 6ZvNU6F+Qk8JJWX74hh4wpkGi4Kwx2TIvN/6/vG/MQbzU6kWTFKYcFtIFVFMW0haD8Ae ExVG66PNjBcgT+ep7GQW5URGgf6KpYnt/nUpGChRYZtIYg6sBuztFxSxesNAZSQDv38L XuMA== X-Gm-Message-State: AOJu0YwXFi2P3rG1DgBoP4WK8Ld6slI1QxgwOIux90ZgIjKZhHhkquUE 2GWNn00gEx+DR0NYUBcJVqZNUq0jlXo= X-Google-Smtp-Source: AGHT+IGdDkrgd0DTCjWZJb38/OoMrv+5n8q2sv62kasmirP4dPPFdIGSHafb5CqpmNpPi4umnBqz7g== X-Received: by 2002:a05:600c:5104:b0:406:51a0:17ea with SMTP id o4-20020a05600c510400b0040651a017eamr373068wms.10.1700776688292; Thu, 23 Nov 2023 13:58:08 -0800 (PST) Received: from ?IPV6:2a01:e0a:1dc:b1c0:fc8d:30b8:64d5:2ae8? ([2a01:e0a:1dc:b1c0:fc8d:30b8:64d5:2ae8]) by smtp.gmail.com with ESMTPSA id o7-20020a05600c510700b0040b36ad5413sm2995518wms.46.2023.11.23.13.58.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Nov 2023 13:58:07 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2023 22:58:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: =?utf-8?q?Fran=C3=A7ois_Dumont?= Subject: [PATCH 0/5][_Hashtable] Optimize insertions To: libstdc++ Cc: gcc-patches Content-Language: en-US X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org This is a series of patch to enhance _Hashtable insertion operations that I'd like to see in gcc 14. I've already submitted something similar a couple of months ago but it is quite a revisited version. 1/5 Is adding benches to show the impact of the different optimizations 2/5 Implementation inconsistencies fixes already submitted individually. 3/5 Avoid redundant rehash check on unordered_multi[map/set] 4/5 Extend the small size optimization to all methods 5/5 Insert node for empty bucket after last rather than before-begin The last patch of the series will require to bump version namespace but it is already plan for the cxx11 abi adoption in this mode. I still need to run the benches that I've already run previously on this new version of the patches. Successfully tested in normal and gnu-versioned namespace modes. François