From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 803543858D28 for ; Thu, 16 Dec 2021 23:34:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 803543858D28 Received: by mail-wr1-x429.google.com with SMTP id t18so763420wrg.11 for ; Thu, 16 Dec 2021 15:34:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7snUIfx+cAMCP4GAvgYX/IG6VF+DL1Ub3bFrVo6/giI=; b=n/qQRXOS6sryDXzPMkjZh8XwukianFZpRuN25aDWqGoT94aZQmCsW5wDGtgWQMMYPz 7tcSSss/xTPHz95r59A8hBMpOVEdcCtciksoKZ4YMuXe8Dwlf641jmQi0RiFwJRVGZt1 0HcgHcseBZsY8a1IhhC5SVW2ggtoUUjjjto+M4iWitxDHB7NAqjyDhHHiyydgh7Gwf8u EzJod0wIouErfuKjfLP7kx/65vJOc6SLGOjErxx/UZaxcmTxJON8lFjyuogP5WtFwDfv dUdHd7kVR8/SVc0RvitsTl6TNLca5YRP9iVtEl6qnjlnnv6zvEQQKfxiO49ImVfBlt0c 22Gg== X-Gm-Message-State: AOAM530wCYjahOL4tLT0+rtd3TMPrQHaV/PU3c4z1/xbNYnph0bg9ZUd fpTipqiYUUOFsQhlE3jYxifV+N53B9Y= X-Google-Smtp-Source: ABdhPJx4XFpFFqjbhIlhRRzlqCP23X8TIrb1Qx7ZY3sHiKwClzbjDEmnJXoAs2emSqxSBVBpne7knQ== X-Received: by 2002:adf:8010:: with SMTP id 16mr201768wrk.559.1639697681466; Thu, 16 Dec 2021 15:34:41 -0800 (PST) Received: from smtpclient.apple ([2a01:e34:ec28:8cb0:a5b9:b62:16cf:26bf]) by smtp.gmail.com with ESMTPSA id 8sm6741250wrb.49.2021.12.16.15.34.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Dec 2021 15:34:40 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: [patch] Fix PR libfortran/95177, ctype.h functions should not be called with char arguments From: FX In-Reply-To: <12368AB6-5F89-4EFA-8F12-F422134C099F@gmail.com> Date: Fri, 17 Dec 2021 00:34:40 +0100 Cc: Harald Anlauf Content-Transfer-Encoding: quoted-printable Message-Id: <3E9B9488-2CE8-485D-82CD-672DBDE7797D@gmail.com> References: <12368AB6-5F89-4EFA-8F12-F422134C099F@gmail.com> To: fortran@gcc.gnu.org X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2021 23:34:44 -0000 > unrelated PS: I=E2=80=99ve been thinking aloud and benchmarking faster = integer I/O for libgfortran at = https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98076 > Comments are welcome on the proposed design, I think the current = proposal is a low-hanging fruit (not risky, much faster). Quick test integrating the idea into libgfortran, here are the timings = to make a formatted write of 10 million integers into a string: - very small value (1), negligible speedup (2.273s to 2.248s) - small value (1042), speedup of 28% (3.224s to 2.350s) - huge(0_8), speed up of 50% (5.914s to 2.560s) - huge(0_16), speed up of 83% (19.46s to 3.31s) Conclusion: this looks quite interesting! I=E2=80=99m not sure what use = cases people have for writing lots of formatted integers, but this = doesn=E2=80=99t sound too bad. Further thought: fast 64-bit itoa() implementations, under the MIT = license (https://github.com/jeaiii/itoa) promise a speed-up of 2 to 10 = times compared to naive implementation. That could bring us down = further, but we probably cannot incorporate that, right? Two questions: 1. This is easy, am I missing something? Some reason why it was never = tried before? 2. Why is gfc_xtoa() in runtime/error.c? We should probably move it. Cheers, FX=