Shop OBEX P1 Docs P2 Docs Learn Events
Speed vs size — Parallax Forums

Speed vs size

John AbshierJohn Abshier Posts: 1,116
edited 2006-07-16 21:22 in Propeller 1
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%

Sign In or Register to comment.