public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/98076] New: Increase speed of integer I/O Date: Tue, 01 Dec 2020 06:49:44 +0000 [thread overview] Message-ID: <bug-98076-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98076 Bug ID: 98076 Summary: Increase speed of integer I/O Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: tkoenig at gcc dot gnu.org Target Milestone: --- Currently, we use GFC_INTEGER_LARGEST for a lot of integer I/O. One place where things could be improved is gfc_itoa: const char * gfc_itoa (GFC_INTEGER_LARGEST n, char *buffer, size_t len) { ... GFC_UINTEGER_LARGEST t; ... t = n; if (n < 0) { negative = 1; t = -n; /*must use unsigned to protect from overflow*/ } ... while (t != 0) { *--p = '0' + (t % 10); t /= 10; } Currently, the quotient / remainder calculation is expanded into a libcall. This could be done by the improved remainder calculation from PR97459 with the calculation of the quotient by multiplicative inverse, and by switching to a smaller datatype once the value fits in there. Both can and should be combined, of course.
next reply other threads:[~2020-12-01 6:49 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-01 6:49 tkoenig at gcc dot gnu.org [this message] 2020-12-01 6:50 ` [Bug libfortran/98076] " tkoenig at gcc dot gnu.org 2021-04-16 16:22 ` tkoenig at gcc dot gnu.org 2021-04-27 11:39 ` jakub at gcc dot gnu.org 2021-07-28 7:05 ` rguenth at gcc dot gnu.org 2021-07-29 19:18 ` anlauf at gcc dot gnu.org 2021-12-16 21:31 ` fxcoudert at gcc dot gnu.org 2021-12-16 21:40 ` fxcoudert at gcc dot gnu.org 2021-12-16 23:20 ` fxcoudert at gcc dot gnu.org 2021-12-17 9:05 ` fxcoudert at gcc dot gnu.org 2021-12-25 13:04 ` fxcoudert at gcc dot gnu.org 2021-12-26 11:14 ` fxcoudert at gcc dot gnu.org 2021-12-27 20:13 ` ro at gcc dot gnu.org 2021-12-27 20:25 ` fxcoudert at gcc dot gnu.org 2021-12-27 21:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-98076-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).