1st optimization attempt - 1st pulse
1st optimization attempt - 8th pulse
Optimized ISR runtime - 1st pulse
Optimized sampling-ISR runtime
Optimized ISR runtime - 8th pulse
Harddisk - stuff thrown away
Harddisk hub motor
Harddisk hub motor
The heads
Coil + parking position bumper
The heads
Magnet with parking position 'thing'
Harddisk - heads and platters
The heads
The heads
The heads
I don't like what I see
Samsung SpinPoint - 2006/05/26
Harddisk - heads and platters
Max headroom - NOT
Time to say goodbye !
The remaining parts
A head
Starting values - 8th pulse
Starting values - 1st pulse
Starting values - overview
Fully interrupt driven soft-uart receiver
Fully interrupt driven soft-uart receiver
Fully interrupt driven soft-uart receiver on an AT…
"The last Hope"
Japan won
Japan won
Quoting StarWars didn't help - Yoda was sleeping ?
FIFA Women's World Cup 2011 - FAN-atics
Nipon flag
Flags all over the place
In it went
Debugging avrdude - arduino.c
The bad
The good
Say no more!
Definitely a quality product
The ugly
Can't get it up
Stereo adapter... yeah right!
Keywords
Authorizations, license
-
Visible by: Everyone -
All rights reserved
-
98 visits
1st optimization attempt


When dealing with this I realized (finally) that I could remove duplicate code and use this as the replacement:
uint8_t bit_value = _BV(bit);
if(bit <= 7) { // read data-bits 0...7
if( (PINA & _BV(PA0)) ) {
soft_uart_rx_byte |= bit_value;
} else {
soft_uart_rx_byte &= ~bit_value;
}
[...]
Now the _BV(bit) expression has to be evaluated just once. But that didn't help at all. It seems the compiler had already optimized the previous code.
uint8_t bit_value = _BV(bit);
if(bit <= 7) { // read data-bits 0...7
if( (PINA & _BV(PA0)) ) {
soft_uart_rx_byte |= bit_value;
} else {
soft_uart_rx_byte &= ~bit_value;
}
[...]
Now the _BV(bit) expression has to be evaluated just once. But that didn't help at all. It seems the compiler had already optimized the previous code.
- Keyboard shortcuts:
Jump to top
RSS feed- Latest comments - Subscribe to the comment feeds of this photo
- ipernity © 2007-2025
- Help & Contact
|
Club news
|
About ipernity
|
History |
ipernity Club & Prices |
Guide of good conduct
Donate | Group guidelines | Privacy policy | Terms of use | Statutes | In memoria -
Facebook
Twitter
Sign-in to write a comment.