Speed vs size
John Abshier
Posts: 1,116
I was curious·if there was a·price·for using byte and word variables. Units in the table below are clock cycles (i.e.·cnt)
a = b = 10
byte word long operation % difference
1392 1392 1056 c = a + b 31.8%
1392 1392 1056 c = a - b 31.8%
1952 1952 1616 c = a * b 20.8%
1936 1936 1600 c = a / b 21.0%
800 800 688 c = a 16.3%
a = b = 10
byte word long operation % difference
1392 1392 1056 c = a + b 31.8%
1392 1392 1056 c = a - b 31.8%
1952 1952 1616 c = a * b 20.8%
1936 1936 1600 c = a / b 21.0%
800 800 688 c = a 16.3%