2011-09-17 02:06:17 -03:00
|
|
|
Type sizes:
|
|
|
|
char : 1
|
|
|
|
short : 2
|
|
|
|
int : 2
|
|
|
|
long : 4
|
|
|
|
long long : 8
|
|
|
|
bool : 1
|
|
|
|
void* : 2
|
|
|
|
|
|
|
|
Operation timings:
|
|
|
|
Note: timings for some operations are very data dependent
|
|
|
|
nop 0.07 usec/call
|
|
|
|
cli/sei 0.14 usec/call
|
2012-05-23 04:30:14 -03:00
|
|
|
micros() 3.17 usec/call
|
|
|
|
millis() 1.47 usec/call
|
|
|
|
fadd 9.18 usec/call
|
|
|
|
fsub 9.25 usec/call
|
|
|
|
fmul 7.96 usec/call
|
|
|
|
fdiv 7.96 usec/call
|
|
|
|
dadd 9.18 usec/call
|
|
|
|
dsub 9.25 usec/call
|
|
|
|
dmul 6.14 usec/call
|
|
|
|
ddiv 6.07 usec/call
|
2012-07-04 21:42:12 -03:00
|
|
|
sin() 112.35 usec/call
|
|
|
|
cos() 113.11 usec/call
|
|
|
|
tan() 154.92 usec/call
|
|
|
|
acos() 167.69 usec/call
|
|
|
|
asin() 82.16 usec/call
|
|
|
|
atan2() 193.34 usec/call
|
2012-05-23 04:30:14 -03:00
|
|
|
sqrt() 31.67 usec/call
|
2011-09-17 02:06:17 -03:00
|
|
|
iadd8 0.48 usec/call
|
|
|
|
isub8 0.48 usec/call
|
|
|
|
imul8 0.67 usec/call
|
2012-05-23 04:30:14 -03:00
|
|
|
idiv8 5.57 usec/call
|
2011-09-17 02:06:17 -03:00
|
|
|
iadd16 0.92 usec/call
|
|
|
|
isub16 0.92 usec/call
|
2012-05-23 04:30:14 -03:00
|
|
|
imul16 1.42 usec/call
|
|
|
|
idiv16 13.31 usec/call
|
2011-09-17 02:06:17 -03:00
|
|
|
iadd32 1.80 usec/call
|
|
|
|
isub32 1.80 usec/call
|
2012-05-23 04:30:14 -03:00
|
|
|
imul32 4.69 usec/call
|
|
|
|
idiv32 37.89 usec/call
|
|
|
|
iadd64 7.96 usec/call
|
|
|
|
isub64 8.53 usec/call
|
|
|
|
imul64 45.82 usec/call
|
|
|
|
idiv64 230.95 usec/call
|
2011-09-17 02:06:17 -03:00
|
|
|
memcpy128 56.76 usec/call
|
2012-05-23 04:30:14 -03:00
|
|
|
memset128 49.84 usec/call
|
|
|
|
delay(1) 1007.65 usec/call
|
|
|
|
|
2012-02-12 04:21:49 -04:00
|
|
|
|
|
|
|
|
|
|
|
Additional notes:
|
|
|
|
|
|
|
|
eeprom_read_byte: 2 usec/call
|
|
|
|
eeprom_write_byte: first call costs 5 usec, each subsequent byte
|
|
|
|
costs 3480 usec as it waits for the EEPROM to be
|
|
|
|
ready from the previous byte
|
|
|
|
|
|
|
|
pgm_read_byte: 0.5 usec per byte
|