What algorithm does printf use to convert integers to radix 16? printf must evaluate its input string, find the variable in its va_list, convert it into hex, and format it somewhere along the way. I would have thought that I could write my own conversion that would be faster as I don't need the format string and the va stuff. However, I keep finding that printf outperforms my algorithms by roughly .2 seconds when outputing 9000+ shorts. What is printf doing? Is it possible that the compiler's author(s) used asm code to get the speed or am I missing something?
Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.
This tutorial covers some basics of pointer, pointer arithmetic and function pointer.
What is a pointer:
A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…