[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: checking against signed integer overflow
From: |
Bruno Haible |
Subject: |
Re: checking against signed integer overflow |
Date: |
Sun, 06 Dec 2020 04:36:24 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-193-generic; KDE/5.18.0; x86_64; ; ) |
Paul Eggert wrote:
> The Gnulib intprops module doesn't use asms and does not rely on undefined
> behavior,
> and I'd be surprised if it's significantly outperformed by the usual asms for
> this particular task.
Yes. Already in 1999 I made the experience that, for a function that contained
lots of integer multiplications (*), GCC (must have been egcs at that time)
produced code that outperformed my hand-written assembly code by a few percent.
And nowadays GCC does even more optimizations than 21 years ago.
Bruno
(*) The function did a Montgomery multiplication mod p, where p > 2^128; this
is the workhorse of the arithmetic on an elliptic curve.
- Re: checking against signed integer overflow, (continued)
- Re: checking against signed integer overflow, Jeffrey Walton, 2020/12/05
- Re: checking against signed integer overflow, Bruno Haible, 2020/12/05
- Re: checking against signed integer overflow, Paul Eggert, 2020/12/05
- Re: checking against signed integer overflow, Bruno Haible, 2020/12/05
- Re: checking against signed integer overflow, Paul Eggert, 2020/12/05
- Re: checking against signed integer overflow, Bruno Haible, 2020/12/06
- Re: checking against signed integer overflow, Paul Eggert, 2020/12/07
- Re: checking against signed integer overflow, Bruno Haible, 2020/12/07
- Re: checking against signed integer overflow, Jeffrey Walton, 2020/12/05
- Re: checking against signed integer overflow, Paul Eggert, 2020/12/05
- Re: checking against signed integer overflow,
Bruno Haible <=
- Re: checking against signed integer overflow, Paul Eggert, 2020/12/06
Re: checking against signed integer overflow, Paul Eggert, 2020/12/05
Re: checking against signed integer overflow, Paul Eggert, 2020/12/06
Re: checking against signed integer overflow, Jeffrey Walton, 2020/12/06
Re: checking against signed integer overflow, Bruno Haible, 2020/12/06
Re: checking against signed integer overflow, Paul Eggert, 2020/12/06
Re: checking against signed integer overflow, Bruno Haible, 2020/12/06