This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: speeding up parts of gcc by using ffs


On Mon, 6 Jan 2003, Zack Weinberg wrote:

> glibc provides ffsl and ffsll which take 'long' and 'long long'
> respectively; may I suggest that you follow these steps:
> 
> 1) put ffsl and ffsll into libiberty.
> 2) have hwint.h #define ffs_hwi and ffs_hwidesti appropriately
> 3) use ffs/ffsl/ffsll/ffs_hwi throughout the compiler
> 4) create __builtin_ffsl and __builtin_ffsll

If any of the uses are genuinely performance-critical (as shown by
profiling), the fallback version of ffs (and ffsl, ffsll) in libiberty
could also be speeded up by replacing it with glibc's generic C
implementation.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]