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.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5734 invoked from network); 11 Apr 2023 09:49:01 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 11 Apr 2023 09:49:01 -0000 Received: (qmail 2036 invoked by uid 550); 11 Apr 2023 09:48:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1991 invoked from network); 11 Apr 2023 09:48:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681206524; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=piaT3tGNehD0rDoJD161kOkSCQ9IYo+DgfbWy7mBlNQ=; b=jZVf42TwnOZJjYupg6vL2SPRvIZoZ2J+nATRv0ZtvQOUHjzi6A5Pgk1ybHfOf+bGmu tiBQRXwdO+ipwBsNDOdQEq6ELhCCn6mCzvkYZbRIIZpZniwwpjBC4jyXpTBIjdFxkuQj jx8iMBBWivtoyNlQGrd6R8Raz87BOx/7fKjMSPRXFeQ5EoZMhj8UfxNz+uz6stThhoK1 CyCsIjHu+F7OXn+5aBaFKG/MLdwixARAEhAcQ1/KE0dXMSAKqHKMCx//xOpJFvW+tZi7 ApHjtuFreX4/ubPfGwDSc5FUZLxJ9dXwT/vk5RtPqFD07tahwITbaVo7/yJWKsWTLgBG q/yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681206524; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=piaT3tGNehD0rDoJD161kOkSCQ9IYo+DgfbWy7mBlNQ=; b=iSScD+oYbBkKXZCCiNSFrn5UuAXbBxaGdj1z0UlOstZGW6M7MJDjBerAO0Fltstucs nlzB2ehhgPQUwSxh0e59DKYJRfpQYPTCgB+Xht72fhiTYflFttMVXJdNmfAP0wd2VMNg f1H9mytgk/EVuE685oiRNlv+bIeAbeu/2tAL/tHSe4MFidArOpo8ejx6seio51OJKUsk U9JaLhO+LH1Y2k9Aol4cYIph6rrDqmOr6CfgHnjxgbHHnRszGKB7I9Q4X/mlV2nerB5u TucEUQnk5tz7kxhNDJjr1XTF22yvh3t5nXzrSt/NbiQ94ZssTI7nt7Od4LLG9NDSdwNX Grpw== X-Gm-Message-State: AAQBX9fkff9+GwKtvGp+bmlGsDppLfpsm+dIZbrXX8kWrHrHMeHx/Bbm R1p3gAPew/F5zc/G6j+wynj0e8BYG4JOuJDGN8O9Irn8 X-Google-Smtp-Source: AKy350ZHzD6FwyDCPGucYYWixNCYv/+ytm+HQJisANhUNw7vbWn9c/QceJuDlSMciZ9zPEinh1rVqEIYBvdla/vHJZo= X-Received: by 2002:a50:c31e:0:b0:501:d2fb:44bb with SMTP id a30-20020a50c31e000000b00501d2fb44bbmr6131540edb.5.1681206523873; Tue, 11 Apr 2023 02:48:43 -0700 (PDT) MIME-Version: 1.0 References: <7ab4e713.9fae.1876e1ac122.Coremail.zhangfei@nj.iscas.ac.cn> In-Reply-To: <7ab4e713.9fae.1876e1ac122.Coremail.zhangfei@nj.iscas.ac.cn> From: Pedro Falcato Date: Tue, 11 Apr 2023 10:48:31 +0100 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] memset_riscv64 On Tue, Apr 11, 2023 at 3:18=E2=80=AFAM =E5=BC=A0=E9=A3=9E wrote: > > Hello, > > Currently, there is no assembly implementation of the memset function for= riscv64 in Musl. > This patch is a riscv64 assembly implementation of the memset function, w= hich is implemented using the basic instruction set and > has better performance than the c language implementation in Musl. I hope= it can be integrated into Musl. Hi! Do you have performance measurements here? What exactly is the difference? As far as I know, no one is actively optimizing on riscv yet, only some movements in the upstream kernel (to prepare for vector extension stuff, unaligned loads/stores) and the corresponding glibc patches. Mainly because it's still super unobtanium and in very early stages, so optimizing is very hard. So what hardware did you use? Is there a large gain here? Given that your memset looks so simple, wouldn't it just be easier to write this in C? --=20 Pedro