Re: >> to accelerate division
From: Ben Pfaff (blp_at_cs.stanford.edu)
Date: 12/08/04
- Next message: Steven: "Lattice-set theory"
- Previous message: Rob Duncan: "Re: No Unique Initial Segment And No Characteristic Expansion"
- Maybe in reply to: James McIninch: "Re: >> to accelerate division"
- Next in thread: David Kastrup: "Re: >> to accelerate division"
- Reply: David Kastrup: "Re: >> to accelerate division"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 07 Dec 2004 19:34:15 -0800
"Mysidia" <mysidia@gmail.com> writes:
> If you can figure out a way of expressing i / 3 as bit shifts,
> then you have an improvement.
> But I am doubting there is a way, without doing the full divide.
You can implement i/3 as a multiplication followed by a bit
shift. In some cases this may be an improvement. However, if it
is an improvement, your compiler may already be doing it for you.
See chapter 10 of Warren, Jr., _Hacker's Delight_, Addison-Wesley
2003, ISBN 0-201-91465-4, for details.
-- Ben Pfaff email: blp@cs.stanford.edu web: http://benpfaff.org
- Next message: Steven: "Lattice-set theory"
- Previous message: Rob Duncan: "Re: No Unique Initial Segment And No Characteristic Expansion"
- Maybe in reply to: James McIninch: "Re: >> to accelerate division"
- Next in thread: David Kastrup: "Re: >> to accelerate division"
- Reply: David Kastrup: "Re: >> to accelerate division"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|