From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31827 invoked from network); 25 Dec 2020 18:29:46 -0000 Received: from ewsd.inri.net (107.191.116.128) by inbox.vuxu.org with ESMTPUTF8; 25 Dec 2020 18:29:46 -0000 Received: from mail-wm1-f53.google.com ([209.85.128.53]) by ewsd; Fri Dec 25 13:28:51 -0500 2020 Received: by mail-wm1-f53.google.com with SMTP id 190so3977154wmz.0 for <9front@9front.org>; Fri, 25 Dec 2020 10:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:to:subject:date:in-reply-to:mime-version :content-transfer-encoding; bh=lWySuUkbP8hfylckhg0njr+Wq06WKUiZACiz+w5Bj98=; b=jcVBOkuRWC2QgKg1/wk1tyxg1cD2tBLKxd54/fXxajWIgzSiut7aYfuFpq0OrFxXf4 Zz+5ejM9A8MCYQpC7a/eap0uY/BBAPLmTe6QKYvQVEcSxgK+JYSfza2yWZARLbNDRkMU Zv+zkfU6R4WqzDQM0VWMUFpPvJD3glN7eXKRx1sM59qVQeUG1GibsHPIlgJiOiqqd6+L YBkc7+Sl9iTAk/l+DR94rR+R7knLXnw7QrPyXMld6qTWRCj3ifLhkZygNph7mHG+YRXh 7Z25eOFekajNLs6NcD2PSumfbZMWuKx7RPaPZ6IwCrFtzzJ1UWnnhnTXN2VJl+KB42Q8 FIfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:to:subject:date:in-reply-to :mime-version:content-transfer-encoding; bh=lWySuUkbP8hfylckhg0njr+Wq06WKUiZACiz+w5Bj98=; b=E3ysabpi0J6qNmzqa7N2sLq+EvhblOyI1yN9NoHnWa487SZaRsdLMuwnBGZa9xPslJ mInqZn5/3EtXZRKbDpd4u5BfDuUqJRz21jXLKxZpcZa1jKzaV0HF8MhrJu6vRpVLR11z IGrxcTqUFijDM8BvH63nXDxI9GZEFbbcXBVnJRTO3cHYum9afisrJGBiWrWLjo7m9Bez Af/cr6esr3QFF6hr9kmLS4NLHjIFu63n/Bg43V6/QPVf3hYA3xKk5snsakKEhwJwQ33j U3ojQAUL2Q09M54xc8BV+sSXqiFisiHFZGfQvEcbQ2mEuL+F3V25XyvDvOHg42Tp/gTS pRqg== X-Gm-Message-State: AOAM533ssehaNHFhT/FoXpQjXt75TQ0Fd/+Sy5aNVIZPrusSZ5OJPjQh tHYTWmaID83UxtTrTZohxj1cTGr6vfU= X-Google-Smtp-Source: ABdhPJxO/FbJ1WHY06U4vMvJfMfHUHqONOCmweuOmaQLu7QiKVCoJSv8gXrFjaqGFe61bT0lKpQ/7A== X-Received: by 2002:a7b:c306:: with SMTP id k6mr9412351wmj.52.1608920926113; Fri, 25 Dec 2020 10:28:46 -0800 (PST) Return-Path: Received: from cirno.home ([185.64.155.70]) by smtp.gmail.com with ESMTPSA id t10sm43267851wrp.39.2020.12.25.10.28.45 for <9front@9front.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Dec 2020 10:28:45 -0800 (PST) From: boehm.igor@gmail.com X-Google-Original-From: igor@gmail.com Message-ID: <3DDE1E483508802CAF9926EE01A0A112@gmail.com> To: 9front@9front.org Date: Fri, 25 Dec 2020 19:28:44 +0100 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: content-addressed proxy-scale GPU-scale TOR polling realtime-java layer Subject: Re: [9front] [PATCH] branchless assembly abs() and labs() for amd64 Reply-To: 9front@9front.org Precedence: bulk > Quoth Kemal : >> hello, >> >> i remembered a method to do branchless abs. >> can i send it as a patch? Nice :-) > more code is more work, especially with platform > specific assembly. is there any real world program > where this matters a lot? On top of having quantitative data (i.e. a microbenchmark as well as something real like a benchmark suite) available that show the benefit, it would also be interesting what the compiler generates for abs()/labs() and juxtapose that to see how much savings in code size, improvement in performance, etc. this can accomplish. That way it is easier to make the trade-off between maintainability burden vs. performance gain.