Messages in this thread | | | Date | Sat, 05 Aug 2000 10:52:14 +0200 | From | Abramo Bagnara <> | Subject | Re: 64 bit divide/mod in 2.4.0-test5 |
| |
"Jeff V. Merkey" wrote: > > Linus. > > a = val >> shift > > for 64 bits divides and > > a = val >> shift; > b = val - (a << shift) > > for 64 bit modulo operations
I suppose this is faster:
a = val & ((1ULL << shift) - 1)
-- Abramo Bagnara mailto:abramo@alsa-project.org
Opera Unica Via Emilia Interna, 140 Phone: +39.0546.656023 48014 Castel Bolognese (RA) - Italy Fax: +39.0546.656023
ALSA project is http://www.alsa-project.org sponsored by SuSE Linux http://www.suse.com
It sounds good!
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |