Re: division by 7 without using division operator
- From: "quarkLore" <agarwal.prateek@xxxxxxxxx>
- Date: 6 Feb 2007 00:50:11 -0800
The fact that compilers can perform this optimization -- and, perhaps
more important, can decide when it is and isn't necessary -- is a good
reason *not* to bother doing this yourself. Just divide by 7; that's
what the "/" operator is for.
/ operator often leads to 32 instructions of shift and add or an
instruction which takes that much time unless you have a multiplier
application to do it. This is the reason many a times it is avoided in
DSP, embedded systems applications and such hacks are needed.
.
- Follow-Ups:
- Re: division by 7 without using division operator
- From: Keith Thompson
- Re: division by 7 without using division operator
- References:
- division by 7 without using division operator
- From: krypto . wizard
- Re: division by 7 without using division operator
- From: Keith Thompson
- division by 7 without using division operator
- Prev by Date: Re: division by 7 without using division operator
- Next by Date: Re: division by 7 without using division operator
- Previous by thread: Re: division by 7 without using division operator
- Next by thread: Re: division by 7 without using division operator
- Index(es):
Relevant Pages
|