print_number() - an alternative for sprintf()

Probably premature optimization, but if you need that extra ounce of efficiency converting numbers to ascii, here's print_number(): 9.27 seconds against sprintf's 22.88, with optional zero-padding and a returned pointer to the char right after the number. Enjoy.

This post is for members only

Already have an account? Sign in.

Subscribe to A garage sale for your mind

Don’t miss out on the latest posts. Sign up now to get access to the library of members-only posts.
[email protected]
Subscribe