Optimize to_binstr() function

Appending multiple times to same string is slow since strcat() needs
to determine the end during each run. So manually maintain a pointer
to the end to speed-up things.

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
Cc: Michael Heimpold <mhei@heimpold.de>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Chris Ball <chris@printf.net>
1 file changed