[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Optimization for easy division
From: |
Michael Tsao |
Subject: |
[avr-gcc-list] Optimization for easy division |
Date: |
Thu, 11 Jul 2002 16:44:57 -0700 |
Does avr-libc automatically turn this:
uint8_t a = 8, b = 2, c = 0;
c = a / b; /* slow */
into this:
uint8_t a = 8, b = 2, c = 0;
c = a >> 1; /* fast */
?
Or should I keep hardcoding shifts for speed as I've done much of my
programming life?
--
Mike Tsao
http://www.sowbug.com/tqw/
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
avr-gcc-list at http://avr1.org
- [avr-gcc-list] Optimization for easy division,
Michael Tsao <=