lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOG64qOuAfHREhcsC3THmhvH+NjhZRJtxp8gG39NosdhbZQvLA@mail.gmail.com>
Date:   Sat, 2 Sep 2023 19:29:04 +0700
From:   Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>
To:     Ammar Faizi <ammarfaizi2@...weeb.org>
Cc:     Willy Tarreau <w@....eu>,
        Thomas Weißschuh <linux@...ssschuh.net>,
        David Laight <David.Laight@...lab.com>,
        Nicholas Rosenberg <inori@...x.org>,
        Michael William Jonathan <moe@...weeb.org>,
        "GNU/Weeb Mailing List" <gwml@...r.gnuweeb.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2 1/4] tools/nolibc: x86-64: Use `rep movsb` for
 `memcpy()` and `memmove()`

On Sat, Sep 2, 2023 at 1:38 PM Ammar Faizi wrote:
> Ok, I'll do that.

Another micro-optimization. Since the likely case is the forward copy,
make it the case that doesn't take the jump.

Pseudo C:
if (unlikely(dst - src < n))
        backward_copy();
else
        forward_copy();

-- Viro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ