iamandi / nanopb

Automatically exported from code.google.com/p/nanopb
zlib License
0 stars 0 forks source link

Check if removing the PB_DE/ENCODERS[] array would be good #92

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently nanopb calls field decoders and encoders through a function pointer 
array. This can be expensive on some platforms, especially 8-bit ones.

Check the effects if the array is replaced with a switch().

Original issue reported on code.google.com by Petteri.Aimonen on 29 Oct 2013 at 1:24

GoogleCodeExporter commented 9 years ago
Seems to decrease code size slightly (2%) and increase execution time slightly 
(2%). Actual effects probably depend on compiler optimizations.

However, this could benefit the overall code structure. It's being developed on 
dev_no_pb_decoders branch.

Original comment by Petteri.Aimonen on 14 Nov 2013 at 5:41