From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 2254F3857416 for ; Tue, 5 Oct 2021 15:33:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2254F3857416 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy03.your-server.de ([88.198.220.132]) by dedi548.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1mXmRx-000Djm-36; Tue, 05 Oct 2021 17:33:49 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXmRx-000MQr-0M; Tue, 05 Oct 2021 17:33:49 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id AC05A4800F0; Tue, 5 Oct 2021 17:33:48 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vRdC16Krwedb; Tue, 5 Oct 2021 17:33:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 6824E4800F1; Tue, 5 Oct 2021 17:33:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IbMyykRpZoAs; Tue, 5 Oct 2021 17:33:48 +0200 (CEST) Received: from zimbra.eb.localhost (unknown [192.168.96.242]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 451C9480091; Tue, 5 Oct 2021 17:33:48 +0200 (CEST) From: Sebastian Huber To: newlib@sourceware.org Cc: devel@rtems.org Subject: [PATCH v2 0/4] Optimize red-black tree insert/extract Date: Tue, 5 Oct 2021 17:33:39 +0200 Message-Id: <20211005153344.91266-1-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.103.3/26313/Tue Oct 5 11:04:18 2021) X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2021 15:33:52 -0000 Code coverage analysis of the red-black tree insert/extract operations de= fined in showed that the macros contain dead code. This patch set simplifies some expressions and add specialized rotations. v2: Add comments in patch 3 and 4. Sebastian Huber (4): sys/tree.h: Simplify loop condition sys/tree.h: Simplify chain of conditions sys/tree.h: Add parent rotations sys/tree.h: Red child with black sibling rotations newlib/libc/include/sys/tree.h | 90 +++++++++++++++++++++++++++++++--- 1 file changed, 82 insertions(+), 8 deletions(-) --=20 2.26.2