bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] addition: gcd.h, gcd.c


From: Bruno Haible
Subject: Re: [Bug-gnulib] addition: gcd.h, gcd.c
Date: Wed, 6 Nov 2002 14:59:18 +0100 (CET)

Paul Eggert writes:
> How about if we change the signature of gcd to use uintmax_t instead
> of unsigned int?

I can agree to 'unsigned long' instead of 'unsigned int', because that
means one machine word. But 'uintmax_t' will often be 'unsigned long long'
i.e. two machine words (or even more), and this means that the
function would be three times slower, especially on register starved
CPUs like the x86.

For size_t you don't need anything more than 'unsigned long'. No
platform designer is so foolish as to use a two-machine-words type for
size_t.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]