Skip to content

tinyxxd 1.3.0

Choose a tag to compare

@xyproto xyproto released this 11 Feb 21:26
· 475 commits to main since this release

Performance

  • Let colors enabled and ASCII (as opposed to EBCDIC) be the "happy path" that the code is optimized for.
  • Do not check hextype in multiple locations. Check it once in main and then call the right function.
  • Refactor several if-expressions and switches.
  • Mark several functions as inline.
  • Use const for several of the function arguments and variables.
  • Identify performance bottlenecks using Valgrind and kcachegrind.

Code quality

  • Use implicit checks for NULL and 0. (thanks @oliverkwebb).
  • Add missing (void) arguments (thanks @oliverkwebb).
  • Output usage information without using snprintf (thanks @oliverkwebb).
  • Introduce a fflush_or_die and a fflush_fseek_and_putc function.
  • Use an enum for the terminal colors.
  • Use setColor and clearColor instead of colorPrologue and colorEpilogue.
  • Let the ignore variable be a bool instead of an int.
  • Remove unused variables and function arguments.
  • Let a few variables be local instead of global.
  • Rename some functions.

Tooling

  • Add a profile target to the Makefile.
  • Add a benchmark script for Python 3 named bench.py that confirms that the performance is mostly IO-bound, and also outputs a couple of graphs by using gnuplot.
  • Add GitHub action configuration for benchmarking, generating Markdown and graphs and committing the results to the main branch.
  • Move the functionality of the release.sh script into the Makefile, and remove the script.
  • Add support for fuzzing by running make fuzz, by using afl-gcc and afl-fuzz.