├── img ├── tinyxxd.png ├── tinyxxd.svg ├── graph_flag_none.svg ├── graph_flag_p.svg ├── graph_flag_b_i.svg ├── graph_flag_b.svg ├── graph_flag_e.svg ├── graph_flag_u.svg └── graph_by_size.svg ├── testfiles ├── somezeros.bin ├── test13.sh ├── test14.sh └── tinybench │ ├── parse_bin_digit │ └── main.c │ └── parse_hex_digit │ └── main.c ├── version.sh ├── .gitignore ├── AUTHORS.md ├── README.md ├── .github └── workflows │ └── build_and_bench.yml ├── tinyxxd.1 ├── Makefile └── LICENSE /img/tinyxxd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xyproto/tinyxxd/HEAD/img/tinyxxd.png -------------------------------------------------------------------------------- /testfiles/somezeros.bin: -------------------------------------------------------------------------------- 1 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZZZZZZZZZZZZZZZZ -------------------------------------------------------------------------------- /version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # The current version goes here, as the default value 3 | VERSION=${1:-'1.3.7'} 4 | 5 | if [ -z "$1" ]; then 6 | echo "The current version is $VERSION, pass the new version as the first argument if you wish to change it" 7 | exit 0 8 | fi 9 | 10 | echo "Setting the version to $VERSION" 11 | sed -i "s/tinyxxd [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*/tinyxxd $VERSION/g" main.c 12 | sed -i "s/VERSION ?= [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*/VERSION ?= $VERSION/g" Makefile 13 | sed -i "s/tinyxxd [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*/tinyxxd $VERSION/g" tinyxxd.1 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.a 2 | *.app 3 | *.bak 4 | *.bin 5 | *.cmd 6 | *.d 7 | *.dSYM/ 8 | *.dat 9 | *.dll 10 | *.dylib 11 | *.elf 12 | *.exp 13 | *.gch 14 | *.hex 15 | *.html 16 | *.i*86 17 | *.idb 18 | *.ilk 19 | *.ko 20 | *.la 21 | *.lib 22 | *.lo 23 | *.map 24 | *.mod* 25 | *.o 26 | *.obj 27 | *.out 28 | *.pch 29 | *.pdb 30 | *.pkl 31 | *.so 32 | *.so.* 33 | *.su 34 | *.swp 35 | *.tar.bz2 36 | *.tar.gz 37 | *.tar.xz 38 | *.tbz2 39 | *.tgz 40 | *.tmp 41 | *.txz 42 | *.x86_64 43 | *output.txt 44 | *time.txt 45 | .tmp_versions/ 46 | Mkfile.old 47 | Module.symvers 48 | callgrind.* 49 | dkms.conf 50 | fuzz_output/ 51 | log.txt 52 | main 53 | modules.order 54 | og_xxd 55 | og_xxd.c 56 | output_* 57 | results.md 58 | timing.txt 59 | tinyxxd 60 | tinyxxd-*/ 61 | tinyxxd2 62 | tinyxxd_* 63 | tinyxxd_debug 64 | xxd 65 | xxd.c 66 | xxd_* 67 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Contributors, in chronological order 2 | 3 | * Bram Moolenaar 4 | * Jürgen Weigert 5 | * DungSaga 6 | * Atsushi SUGAWARA 7 | * Yegappan Lakshmanan 8 | * Erik Auerswald 9 | * David Gow 10 | * Philip H <47042125+pheiduck@users.noreply.github.com> 11 | * Aapo Rantalainen 12 | * Christian Brabandt 13 | * Ken Takata 14 | * tristhaus 15 | * OldWorldOrdr 16 | * Keith Thompson 17 | * Igor Todorovski 18 | * Kuratius 19 | * Goffredo Baroncelli 20 | * Lennard Hofmann 21 | * RestorerZ 22 | * Alexander F. Rødseth 23 | * Husam Harazi 24 | * Oliver Webb 25 | * Andre Chang 26 | * Aapo Rantalainen 27 | -------------------------------------------------------------------------------- /testfiles/test13.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Test 19 from https://github.com/vim/vim/blob/master/src/testdir/test_xxd.vim 4 | 5 | # Path to the xxd binary in the current directory 6 | #XXD_CMD="/usr/bin/xxd" 7 | #XXD_CMD="$PWD/xxd" 8 | XXD_CMD=./tinyxxd 9 | 10 | # Create the file XXDfile with the content 'TESTabcd09' and a newline 11 | echo "TESTabcd09" > XXDfile 12 | 13 | # Run xxd to convert the file to a C include in binary format 14 | $XXD_CMD -i -b XXDfile > output.txt 15 | 16 | # Expected output 17 | expected_output=$(cat < Xxdin 18 | 19 | # Run tinyxxd with little-endian option and 6 columns 20 | $XXD -e -c6 Xxdin > tinyxxd_output1.txt 21 | 22 | # Expected output for Test 1 23 | expected_output1='00000000: 44434241 4645 ABCDEF' 24 | 25 | # Extract the relevant line (first line) from tinyxxd output 26 | output_line1=$(sed -n '1p' tinyxxd_output1.txt) 27 | 28 | # Compare the output 29 | if [ "$output_line1" = "$expected_output1" ]; then 30 | echo "Test 1 passed." 31 | else 32 | echo "Test 1 failed." 33 | echo "Expected output:" 34 | echo "$expected_output1" 35 | echo "Actual output:" 36 | echo "$output_line1" 37 | # Clean up 38 | rm -f Xxdin tinyxxd_output1.txt 39 | exit 1 40 | fi 41 | 42 | # Test 2: Input "ABCDEFGHI" with -e -c9 43 | echo "Running Test 2..." 44 | 45 | # Create input file with content "ABCDEFGHI" without a trailing newline 46 | echo -n "ABCDEFGHI" > Xxdin 47 | 48 | # Run tinyxxd with little-endian option and 9 columns 49 | $XXD -e -c9 Xxdin > tinyxxd_output2.txt 50 | 51 | # Expected output for Test 2 52 | expected_output2='00000000: 44434241 48474645 49 ABCDEFGHI' 53 | 54 | # Extract the relevant line (first line) from tinyxxd output 55 | output_line2=$(sed -n '1p' tinyxxd_output2.txt) 56 | 57 | # Compare the output 58 | if [ "$output_line2" = "$expected_output2" ]; then 59 | echo "Test 2 passed." 60 | else 61 | echo "Test 2 failed." 62 | echo "Expected output:" 63 | echo "$expected_output2" 64 | echo "Actual output:" 65 | echo "$output_line2" 66 | # Clean up 67 | rm -f Xxdin tinyxxd_output1.txt tinyxxd_output2.txt 68 | exit 1 69 | fi 70 | 71 | # Clean up temporary files 72 | rm -f Xxdin tinyxxd_output1.txt tinyxxd_output2.txt 73 | 74 | echo "All tests passed successfully." 75 | exit 0 76 | -------------------------------------------------------------------------------- /img/tinyxxd.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testfiles/tinybench/parse_bin_digit/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | inline int parse_bin_digit(const int ch) 5 | { 6 | switch (ch) { 7 | case '0': 8 | return 0; 9 | case '1': 10 | return 1; 11 | default: 12 | return -1; 13 | } 14 | } 15 | 16 | inline int parse_bin_digit2(const int ch) 17 | { 18 | return (ch < '0' || ch > '1') ? -1 : ch - '0'; 19 | } 20 | 21 | inline int parse_bin_digit3(const int ch) 22 | { 23 | if (ch == '0') { 24 | return 0; 25 | } 26 | if (ch == '1') { 27 | return 1; 28 | } 29 | return -1; 30 | } 31 | 32 | inline int parse_bin_digit4(const int ch) 33 | { 34 | if (ch == '0') { 35 | return 0; 36 | } 37 | return (ch == '1' ? 1 : -1); 38 | } 39 | 40 | static const int lookup_table_int[256] = { 41 | // Initialize all elements to -1 42 | [0 ... 255] = -1, 43 | // Numeric digits 44 | ['0'] = 0, 45 | ['1'] = 1, 46 | }; 47 | 48 | int main() 49 | { 50 | const int N = 100000000; // Number of iterations 51 | int sum = 0; 52 | clock_t start, end; 53 | double cpu_time_used; 54 | 55 | // Prepare test data 56 | char test_data[] = { '0', '1', '2', 'a', '0', '1', '1', '0' }; 57 | int data_size = sizeof(test_data) / sizeof(test_data[0]); 58 | 59 | // Benchmark parse_bin_digit 60 | sum = 0; 61 | start = clock(); 62 | for (int i = 0; i < N; i++) { 63 | sum += parse_bin_digit(test_data[i % data_size]); 64 | } 65 | end = clock(); 66 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 67 | printf("parse_bin_digit time: %f seconds, sum=%d\n", cpu_time_used, sum); 68 | 69 | // Benchmark parse_bin_digit2 70 | sum = 0; 71 | start = clock(); 72 | for (int i = 0; i < N; i++) { 73 | sum += parse_bin_digit2(test_data[i % data_size]); 74 | } 75 | end = clock(); 76 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 77 | printf("parse_bin_digit2 time: %f seconds, sum=%d\n", cpu_time_used, sum); 78 | 79 | // Benchmark parse_bin_digit3 80 | sum = 0; 81 | start = clock(); 82 | for (int i = 0; i < N; i++) { 83 | sum += parse_bin_digit3(test_data[i % data_size]); 84 | } 85 | end = clock(); 86 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 87 | printf("parse_bin_digit3 time: %f seconds, sum=%d\n", cpu_time_used, sum); 88 | 89 | // Benchmark parse_bin_digit4 90 | sum = 0; 91 | start = clock(); 92 | for (int i = 0; i < N; i++) { 93 | sum += parse_bin_digit4(test_data[i % data_size]); 94 | } 95 | end = clock(); 96 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 97 | printf("parse_bin_digit4 time: %f seconds, sum=%d\n", cpu_time_used, sum); 98 | 99 | // Benchmark lookup_table_int 100 | sum = 0; 101 | start = clock(); 102 | for (int i = 0; i < N; i++) { 103 | sum += lookup_table_int[test_data[i % data_size]]; 104 | } 105 | end = clock(); 106 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 107 | printf("lookup_table_int time: %f seconds, sum=%d\n", cpu_time_used, sum); 108 | 109 | return 0; 110 | } 111 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## TinyXXD 2 | 3 | [![Build & Benchmark](https://github.com/xyproto/tinyxxd/actions/workflows/build_and_bench.yml/badge.svg)](https://github.com/xyproto/tinyxxd/actions/workflows/build_and_bench.yml) 4 | 5 | `xxd` is a utility that comes with ViM. It can be used to view binary or text files as hex codes. It is often installed on UNIX-like systems. It can dump files to hex, and also do the same thing in reverse: recreate files from hex codes. 6 | 7 | `tinyxxd` is a standalone fork of `xxd`, a slight modernization of the C code, a slight performance increase and a drop-in replacement for `xxd`. It contains the same logic and supports the exact same flags. It is also only licensed under MIT/GPL2, and not under the VIM license. 8 | 9 | `tinyxxd` can be useful in connection with building and packaging software, since it's a smaller dependency than `ViM`, only requires a C11 compiler and is slightly faster. 10 | 11 | `tinyxxd` only has the goal of supporting Linux, but it should also build and run on other UNIX-like platforms. 12 | 13 | ## Performance 14 | 15 | The performance is mostly IO bound. 16 | 17 | `tinyxxd` can be profiled by running `make profile` or benchmarked by running `make bench`. 18 | 19 | `tinyxxd` is just a tiny bit faster than `xxd`, but as the size of the input data grows, the performance advantage appears to be increasing. 20 | 21 | Note that this may be benchmarked as part of the CI test, which affects the benchmark results, especially for small amounts of test data: 22 | 23 | ![performance graph](img/graph_by_size.svg) 24 | 25 | For more details, take a look at the latest [benchmark results](benchmark_results.md), which are added by the CI benchmark. 26 | 27 | ## Requirements 28 | 29 | * A C-compiler that supports C11. 30 | * For profiling: `valgrind` and `kcachegrind`. 31 | * For benchmarking: `gcc`, `gnuplot` and `python3`. 32 | * For fuzzing: `afl-gcc` and `afl-fuzz`. 33 | 34 | ## Packaging status 35 | 36 | [![Packaging status](https://repology.org/badge/vertical-allrepos/tinyxxd.svg)](https://repology.org/project/tinyxxd/versions) 37 | 38 | ## Source code 39 | 40 | The source code for the program is a single `main.c` source file, written in C11. 41 | 42 | Some of the code has been neatly refactored into separate functions, and a couple of enums have been introduced. 43 | 44 | ## Testing 45 | 46 | Tested on Arch Linux, where it builds, runs and all tests passes. 47 | 48 | `make test` can be used to run simple tests, and `python bench.py` can run additional tests while benchmarking. 49 | 50 | ## Platforms 51 | 52 | `tinyxxd` also builds for macOS and Windows (using Mingw), but it has not been tested properly on those platforms yet, and there might be variations on how it behaves compared to Linux. 53 | 54 | ## Benchmarking 55 | 56 | `tinyxxd` can be benchmarked by running `python bench.py` (or `python3 bench.py`). 57 | 58 | The performance is mostly IO bound, which is reflected in the [benchmark graphs](benchmark_results.md). 59 | 60 | ## Fuzzing 61 | 62 | `make fuzz` can be used to build `tinyxxd` with `afl-gcc` and then start fuzzing the executable with varied input designed to find edge cases in the program. 63 | 64 | ## Packaging 65 | 66 | In connection with packaging, letting this utility provide and replace `xxd`, possibly by providing a `/usr/bin/xxd` symlink that points to `/usr/bin/tinyxxd`, is recommended. 67 | 68 | ### General info 69 | 70 | * License: `GPL-2.0-only` and/or `MIT`. See the [`LICENSE`](LICENSE) file for more information. 71 | * Version: 1.3.7 72 | -------------------------------------------------------------------------------- /.github/workflows/build_and_bench.yml: -------------------------------------------------------------------------------- 1 | name: Build&bench 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths-ignore: 8 | - '**/.gitignore' 9 | - '**/AUTHORS.md' 10 | - '**/README.md' 11 | - '**/TODO.md' 12 | - '**/*.txt' 13 | - '**/*.sh' 14 | - '**/tinyxxd*.png' 15 | - '**/tinyxxd*.svg' 16 | pull_request: 17 | branches-ignore: 18 | - 'src-*-update*' 19 | paths-ignore: 20 | - '**/.gitignore' 21 | - '**/AUTHORS.md' 22 | - '**/README.md' 23 | - '**/TODO.md' 24 | - '**/*.txt' 25 | - '**/*.sh' 26 | - '**/tinyxxd*.png' 27 | - '**/tinyxxd*.svg' 28 | 29 | jobs: 30 | build-linux: 31 | runs-on: ubuntu-latest 32 | container: archlinux:latest 33 | 34 | steps: 35 | - name: Checkout code 36 | uses: actions/checkout@v4 37 | 38 | - name: Update system and Install dependencies 39 | run: | 40 | pacman -Syu --noconfirm && \ 41 | pacman -S --noconfirm --needed curl diffutils gcc make && \ 42 | pacman -Scc --noconfirm 43 | 44 | - name: Build 45 | run: make 46 | 47 | - name: Test 48 | run: make test 49 | 50 | build-macos: 51 | runs-on: macos-latest 52 | 53 | steps: 54 | - name: Checkout code 55 | uses: actions/checkout@v4 56 | 57 | - name: Build 58 | run: make 59 | 60 | - name: Test 61 | run: make test 62 | 63 | build-windows: 64 | runs-on: windows-latest 65 | 66 | steps: 67 | - name: Checkout code 68 | uses: actions/checkout@v4 69 | 70 | - name: Setup environment 71 | run: | 72 | choco install curl diffutils make mingw -y 73 | 74 | - name: Build 75 | run: make CC=gcc 76 | 77 | benchmark-linux: 78 | needs: build-linux 79 | runs-on: ubuntu-latest 80 | container: archlinux:latest 81 | 82 | steps: 83 | - name: Checkout code 84 | uses: actions/checkout@v4 85 | 86 | - name: Cache benchmark results 87 | uses: actions/cache@v4 88 | with: 89 | path: ./results.pkl 90 | key: results-${{ github.ref }}-${{ github.run_id }} 91 | restore-keys: | 92 | results-${{ github.ref }}- 93 | 94 | - name: Install dependencies 95 | run: | 96 | pacman -Syu --noconfirm && \ 97 | pacman -S --noconfirm --needed curl diffutils gcc git gnuplot make python && \ 98 | pacman -Scc --noconfirm 99 | 100 | - name: Check for cached results 101 | run: | 102 | if [ -f results.pkl ]; then 103 | echo "Cached results.pkl found." 104 | else 105 | echo "No cached results.pkl found." 106 | fi 107 | 108 | - name: Run bench.py 109 | run: python3 bench.py -s 110 | 111 | - name: Archive results for Git operations 112 | uses: actions/upload-artifact@v4 113 | with: 114 | name: benchmark-results 115 | path: | 116 | bench*.md 117 | img/ 118 | 119 | benchmark-commit: 120 | needs: benchmark-linux 121 | runs-on: ubuntu-latest 122 | permissions: 123 | contents: write 124 | 125 | steps: 126 | - name: Checkout code 127 | uses: actions/checkout@v4 128 | 129 | - name: Download benchmark results 130 | uses: actions/download-artifact@v4 131 | with: 132 | name: benchmark-results 133 | 134 | - name: Configure Git 135 | run: | 136 | git config user.name 'GitHub Actions' 137 | git config user.email 'actions@github.com' 138 | 139 | - name: Check for changes 140 | id: git-check 141 | run: | 142 | git add bench*.md img/ 143 | if git diff --staged --quiet; then 144 | echo "No changes to the content." 145 | echo "changes=false" >> $GITHUB_ENV 146 | else 147 | echo "Content changes detected." 148 | echo "changes=true" >> $GITHUB_ENV 149 | fi 150 | 151 | - name: Commit benchmark updates 152 | if: env.changes == 'true' 153 | run: | 154 | git commit -m "Update benchmarks and images" -a 155 | git push 156 | -------------------------------------------------------------------------------- /tinyxxd.1: -------------------------------------------------------------------------------- 1 | .\" -*-Nroff-*- 2 | .\" 3 | .TH "tinyxxd" 1 "24 Aug 2024" "" "" 4 | .SH NAME 5 | tinyxxd \- A hexadecimal, binary, and ASCII dump utility with color support 6 | .SH SYNOPSIS 7 | .B tinyxxd 8 | [options] [infile [outfile]] 9 | .sp 10 | .B tinyxxd 11 | \-r [-s [-]offset] [-c cols] [-ps] [infile [outfile]] 12 | .sp 13 | .SH DESCRIPTION 14 | .B tinyxxd 15 | is a versatile utility for creating hex, binary, and ASCII dumps from binary files. It can also reverse these dumps back into binary form. Additionally, it supports various output formats, including C include files and PostScript. 16 | .B tinyxxd 17 | enhances readability by optionally colorizing the output, respecting the NO_COLOR environment variable. 18 | .sp 19 | .SH OPTIONS 20 | .TP 21 | .B \-a | \-autoskip 22 | Toggle autoskip mode. In this mode, a single `*` replaces lines that consist only of zeros. Default is off. 23 | .TP 24 | .B \-b | \-bits 25 | Output a binary digit dump instead of hexadecimal. This option is incompatible with \-ps. 26 | .TP 27 | .B \-c cols | \-cols cols 28 | Format the output to include cols octets per line. Default is 16 (12 in C include style, 30 in PostScript). 29 | .TP 30 | .B \-C | \-capitalize 31 | Capitalize variable names in C include file style (\-i). 32 | .TP 33 | .B \-d 34 | Show the offset in decimal instead of hexadecimal. 35 | .TP 36 | .B \-e 37 | Create a little-endian dump. This option is incompatible with \-ps, \-i, and \-r. 38 | .TP 39 | .B \-g bytes | \-groupsize bytes 40 | Group output into octets of bytes size in the normal output mode. Default is 2 (4 for little-endian). 41 | .TP 42 | .B \-E | \-EBCDIC 43 | Display the characters in EBCDIC encoding instead of ASCII. 44 | .TP 45 | .B \-h | \-help 46 | Print a summary of the options. 47 | .TP 48 | .B \-i | \-include 49 | Output in C include file style. 50 | .TP 51 | .B \-l len | \-len len 52 | Stop after len octets. 53 | .TP 54 | .B \-n name | \-name name 55 | Set the variable name used in C include output (\-i). 56 | .TP 57 | .B \-o offset 58 | Add offset to the displayed file position. 59 | .TP 60 | .B \-p | \-ps | \-postscript | \-plain 61 | Output in PostScript plain hexdump style. 62 | .TP 63 | .B \-r | \-revert 64 | Reverse operation: convert (or patch) hexdump into binary. 65 | .TP 66 | .B \-R when 67 | Colorize the output. when can be 'always', 'auto', or 'never'. Default: 'auto'. 68 | .TP 69 | .B \-seek offset 70 | When used after \-r: revert with offset added to file positions found in hex dump. 71 | .TP 72 | .B \-s [+][-]seek 73 | Start at seek bytes absolute or relative (with \\+ for relative offset). 74 | .TP 75 | .B \-u 76 | Use uppercase letters for hexadecimal output. Default is lowercase. 77 | .TP 78 | .B \-v | \-version 79 | Show version information. 80 | .sp 81 | .SH EXAMPLES 82 | .TP 83 | .B Create a standard hex dump with color: 84 | .nf 85 | tinyxxd file.bin 86 | .fi 87 | .TP 88 | .B Create a little-endian hex dump: 89 | .nf 90 | tinyxxd \-e file.bin 91 | .fi 92 | .TP 93 | .B Output in binary digit format: 94 | .nf 95 | tinyxxd \-b file.bin 96 | .fi 97 | .TP 98 | .B Create a C include file: 99 | .nf 100 | tinyxxd \-i file.bin > file.h 101 | .fi 102 | .TP 103 | .B Reverse a hex dump into binary: 104 | .nf 105 | tinyxxd \-r dump.hex > file.bin 106 | .fi 107 | .sp 108 | .SH EXIT STATUS 109 | .B 0 110 | \- Success. 111 | .B 1-5 112 | \- Various errors (e.g., file I/O errors, invalid arguments). 113 | .sp 114 | .SH ENVIRONMENT VARIABLES 115 | .TP 116 | .B NO_COLOR 117 | If set, disables color output. 118 | .sp 119 | .SH CAVEATS 120 | .TP 121 | .B Little-endian dumps 122 | The \-e option only affects the hexadecimal representation and not the ASCII (or EBCDIC) characters on the right side of the dump. The option is incompatible with \-r, \-p, or \-i. 123 | .TP 124 | .B Reverse Operation (\-r) 125 | The reverse operation may encounter difficulties with lines that are not formatted as expected. It will skip over non-conforming lines and continue processing. Line numbers are used for positioning when writing output, so the order and completeness of lines are important. 126 | .sp 127 | .SH BUGS 128 | No known bugs so far. Issues can be reported at: https://github.com/xyproto/tinyxxd/issues 129 | .sp 130 | .SH AUTHOR 131 | .B tinyxxd 132 | was written by: 133 | .sp 134 | Bram Moolenaar 135 | .br 136 | Jürgen Weigert 137 | .br 138 | DungSaga 139 | .br 140 | Atsushi SUGAWARA 141 | .br 142 | Yegappan Lakshmanan 143 | .br 144 | Erik Auerswald 145 | .br 146 | David Gow 147 | .br 148 | Philip H <47042125+pheiduck@users.noreply.github.com> 149 | .br 150 | Aapo Rantalainen 151 | .br 152 | Christian Brabandt 153 | .br 154 | Ken Takata 155 | .br 156 | tristhaus 157 | .br 158 | Christian Brabandt 159 | .br 160 | OldWorldOrdr 161 | .br 162 | Keith Thompson 163 | .br 164 | Igor Todorovski 165 | .br 166 | Kuratius 167 | .br 168 | Goffredo Baroncelli 169 | .br 170 | Lennard Hofmann 171 | .br 172 | Alexander F. Rødseth 173 | .br 174 | Husam Harazi 175 | .br 176 | Oliver Webb 177 | .sp 178 | .SH VERSION 179 | .B tinyxxd 1.3.7 180 | .sp 181 | .SH SEE ALSO 182 | .B xxd(1) 183 | \- Original hex dump utility. 184 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean fmt install profile test uninstall 2 | 3 | OPTFLAGS ?= -O2 -finline-functions 4 | WARNFLAGS ?= -Wall -Wextra -Wpedantic -Wshadow -Werror -Wfatal-errors -Wconversion -Wsign-conversion -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 5 | CFLAGS ?= -std=c11 -pipe -fPIC $(OPTFLAGS) $(WARNFLAGS) 6 | 7 | UNAME_S := $(shell uname -s) 8 | ifeq ($(UNAME_S),Darwin) 9 | CFLAGS += -fstack-protector-strong -D_GNU_SOURCE -fno-plt 10 | else ifeq ($(OS),Windows_NT) 11 | CFLAGS += -D_WIN32 12 | else 13 | CFLAGS += -fstack-protector-strong -D_GNU_SOURCE -fno-plt -Wl,-z,now -D_FORTIFY_SOURCE=3 14 | endif 15 | 16 | PREFIX ?= /usr 17 | BINDIR ?= $(PREFIX)/bin 18 | DESTDIR ?= 19 | 20 | VERSION ?= 1.3.7 21 | RELEASE_DIR := tinyxxd-$(VERSION) 22 | RELEASE_TARBALL := $(RELEASE_DIR).tar.gz 23 | RELEASE_FILES := main.c Makefile COPYING README.md 24 | 25 | tinyxxd: main.c 26 | $(CC) $(CFLAGS) -o $@ $< 27 | 28 | tinyxxd_debug: main.c 29 | $(CC) $(CFLAGS) -g -o $@ $< 30 | 31 | tinyxxd_asan: main.c 32 | $(CC) $(CFLAGS) -g -fsanitize=address,undefined -o $@ $< 33 | 34 | profile: tinyxxd_debug 35 | dd if=/dev/random of=sample.bin bs=1M count=1 36 | valgrind --dump-instr=yes --collect-jumps=yes --tool=callgrind ./tinyxxd_debug sample.bin 37 | @rm -f sample.bin 38 | @kcachegrind || echo 'Profile generated. Use kcachegrind or a similar tool to view the callgrind output.' 39 | 40 | bench: 41 | @rm -f -- *.bin *.dat *.hex *.pkl xxd testfiles/xxd.c 42 | @python3 bench.py -q 43 | 44 | benchfull: 45 | @rm -f -- *.bin *.dat *.hex *.pkl xxd testfiles/xxd.c 46 | @python3 bench.py 47 | 48 | fmt: main.c 49 | clang-format -style=WebKit -i main.c 50 | 51 | test: xxd tinyxxd_asan 52 | @echo 'Preparing tests...' 53 | @echo -n 'This is a test file' > sample.bin 54 | @echo 'Running tests...' 55 | @$(MAKE) run_test CMD='-a testfiles/somezeros.bin' DESC='Show nul-lines as single asterisk' 56 | @$(MAKE) run_test CMD='-Ralways -g1 -c256 -d -o 9223372036854775808 testfiles/somezeros.bin' DESC='Test for buffer overflow' 57 | @$(MAKE) run_test CMD='-s +5 sample.bin' DESC='Seek +5' 58 | @$(MAKE) run_test CMD='-s -5 sample.bin' DESC='Seek -5' 59 | @$(MAKE) run_test CMD='-l 7 sample.bin' DESC='Stop after len=7' 60 | @$(MAKE) run_test CMD='-a testfiles/somezeros.bin' DESC='Show nul-lines as single asterisk' 61 | @$(MAKE) run_test CMD='-Ralways -g1 -c256 -d -o 9223372036854775808 testfiles/somezeros.bin' DESC='Test for buffer overflow' 62 | @$(MAKE) run_test CMD='-s +5 sample.bin' DESC='Seek +5' 63 | @$(MAKE) run_test CMD='-s -5 sample.bin' DESC='Seek -5' 64 | @$(MAKE) run_test CMD='-l 7 sample.bin' DESC='Stop after len=7' 65 | @$(MAKE) run_test CMD='-c 8 sample.bin' DESC='Hex dump with 8 columns' 66 | @$(MAKE) run_test CMD='-p sample.bin' DESC='Plain hex dump (PostScript style)' 67 | @$(MAKE) run_test CMD='-i sample.bin' DESC='C include file style' 68 | @$(MAKE) run_test CMD='-e sample.bin' DESC='Little-endian hex dump' 69 | @$(MAKE) run_test CMD='-b sample.bin' DESC='Binary digit dump' 70 | @$(MAKE) run_test CMD='-u sample.bin' DESC='Capitalized hex output' 71 | @$(MAKE) run_test CMD='-E sample.bin' DESC='Show EBCDIC' 72 | @$(MAKE) verify_conversion_test 73 | @rm -f -- *.hex sample.bin tinyxxd_output.txt xxd_output.txt 74 | @echo 'All tests complete.' 75 | 76 | run_test: 77 | @echo "Running test: $(DESC)" 78 | @./tinyxxd_asan $(CMD) > tinyxxd_output.txt 79 | @./xxd $(CMD) > xxd_output.txt 80 | @if diff -q tinyxxd_output.txt xxd_output.txt > /dev/null; then \ 81 | echo 'Test passed'; \ 82 | else \ 83 | echo 'Test failed'; \ 84 | diff tinyxxd_output.txt xxd_output.txt; \ 85 | fi 86 | 87 | verify_conversion_test: 88 | @echo "Running conversion and verification test..." 89 | @./tinyxxd_asan sample.bin > sample_tinyxxd.bin 90 | @./tinyxxd_asan -r sample_tinyxxd.bin > sample_restored.bin 91 | @if diff -q sample.bin sample_restored.bin > /dev/null; then \ 92 | echo -e "\033[0;32mConversion and verification test passed\033[0m"; \ 93 | else \ 94 | echo -e "\033[0;31mConversion and verification test failed\033[0m"; \ 95 | exit 1; \ 96 | fi 97 | @rm -f sample_tinyxxd.bin sample_restored.bin 98 | 99 | update-version: 100 | @echo "Updating version in main.c to $(VERSION)" 101 | @sed -i 's/const char\* version = "tinyxxd [0-9]*\.[0-9]*\.[0-9]*"/const char* version = "tinyxxd $(VERSION)"/' main.c 102 | 103 | release: fmt test update-version 104 | @echo "Creating release version $(VERSION)" 105 | $(foreach file,$(RELEASE_FILES),$(if $(wildcard $(file)),,$(error Missing file $(file)))) 106 | mkdir -p "$(RELEASE_DIR)" 107 | cp -v $(RELEASE_FILES) "$(RELEASE_DIR)/" 108 | tar zcvf $(RELEASE_TARBALL) "$(RELEASE_DIR)/" 109 | rm -rf "$(RELEASE_DIR)/" 110 | @echo "Release package created: $(RELEASE_TARBALL)" 111 | 112 | tinyxxd_fuzz: main.c 113 | afl-gcc $(CFLAGS) -o $@ $< 114 | 115 | fuzz: tinyxxd_fuzz 116 | export AFL_PATH=$(which afl-fuzz) 117 | export AFL_SKIP_CPUFREQ=1 118 | @mkdir -p input_dir 119 | @dd if=/dev/urandom of=input_dir/sample.bin count=1 bs=128 120 | afl-fuzz -i input_dir -o fuzz_output -- ./tinyxxd_fuzz @@ 121 | 122 | testfiles/xxd.c: 123 | cd testfiles && curl -sOL "https://raw.githubusercontent.com/vim/vim/master/src/xxd/xxd.c" 124 | 125 | xxd: testfiles/xxd.c 126 | $(CC) -std=c11 -pipe -D_GNU_SOURCE $(OPTFLAGS) -o $@ $< 127 | 128 | install: tinyxxd 129 | install -D -m 755 tinyxxd "$(DESTDIR)$(BINDIR)/tinyxxd" 130 | 131 | uninstall: 132 | rm -f "$(DESTDIR)$(BINDIR)/tinyxxd" 133 | 134 | clean: 135 | rm -r -f -- *.bin *.dat *.hex *.o *.pkl *.tar.gz callgrind.out.* og_xxd* output_* tinyxxd tinyxxd_* tinyxxd_debug xxd testfiles/xxd.c xxd_* 136 | -------------------------------------------------------------------------------- /testfiles/tinybench/parse_hex_digit/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | // Initialize the lookup table outside of any function 5 | static const signed char lookup_table[256] = { 6 | // Initialize all elements to -1 7 | [0 ... 255] = -1, 8 | // Numeric digits 9 | ['0'] = 0, ['1'] = 1, ['2'] = 2, ['3'] = 3, ['4'] = 4, 10 | ['5'] = 5, ['6'] = 6, ['7'] = 7, ['8'] = 8, ['9'] = 9, 11 | // Uppercase letters 12 | ['A'] = 10, ['B'] = 11, ['C'] = 12, ['D'] = 13, ['E'] = 14, ['F'] = 15, 13 | // Lowercase letters 14 | ['a'] = 10, ['b'] = 11, ['c'] = 12, ['d'] = 13, ['e'] = 14, ['f'] = 15, 15 | }; 16 | 17 | // Initialize the lookup table outside of any function 18 | static const int lookup_table_int[256] = { 19 | // Initialize all elements to -1 20 | [0 ... 255] = -1, 21 | // Numeric digits 22 | ['0'] = 0, ['1'] = 1, ['2'] = 2, ['3'] = 3, ['4'] = 4, 23 | ['5'] = 5, ['6'] = 6, ['7'] = 7, ['8'] = 8, ['9'] = 9, 24 | // Uppercase letters 25 | ['A'] = 10, ['B'] = 11, ['C'] = 12, ['D'] = 13, ['E'] = 14, ['F'] = 15, 26 | // Lowercase letters 27 | ['a'] = 10, ['b'] = 11, ['c'] = 12, ['d'] = 13, ['e'] = 14, ['f'] = 15, 28 | }; 29 | 30 | static const int lookup_table_add_one_int[256] = { 31 | // Numeric digits '0' to '9' mapped to 1 to 10 32 | ['0'] = 1, ['1'] = 2, ['2'] = 3, ['3'] = 4, ['4'] = 5, 33 | ['5'] = 6, ['6'] = 7, ['7'] = 8, ['8'] = 9, ['9'] = 10, 34 | // Uppercase letters 'A' to 'F' mapped to 11 to 16 35 | ['A'] = 11, ['B'] = 12, ['C'] = 13, ['D'] = 14, ['E'] = 15, ['F'] = 16, 36 | // Lowercase letters 'a' to 'f' mapped to 11 to 16 37 | ['a'] = 11, ['b'] = 12, ['c'] = 13, ['d'] = 14, ['e'] = 15, ['f'] = 16, 38 | }; 39 | 40 | 41 | static const unsigned char lookup_table_add_one_byte[256] = { 42 | // Numeric digits '0' to '9' mapped to 1 to 10 43 | ['0'] = 1, ['1'] = 2, ['2'] = 3, ['3'] = 4, ['4'] = 5, 44 | ['5'] = 6, ['6'] = 7, ['7'] = 8, ['8'] = 9, ['9'] = 10, 45 | // Uppercase letters 'A' to 'F' mapped to 11 to 16 46 | ['A'] = 11, ['B'] = 12, ['C'] = 13, ['D'] = 14, ['E'] = 15, ['F'] = 16, 47 | // Lowercase letters 'a' to 'f' mapped to 11 to 16 48 | ['a'] = 11, ['b'] = 12, ['c'] = 13, ['d'] = 14, ['e'] = 15, ['f'] = 16, 49 | }; 50 | 51 | inline int parse_hex_digit(const int ch) 52 | { 53 | return (ch >= '0' && ch <= '9') ? ch - '0' 54 | : (ch >= 'a' && ch <= 'f') ? ch - 'a' + 10 55 | : (ch >= 'A' && ch <= 'F') ? ch - 'A' + 10 56 | : -1; 57 | 58 | } 59 | 60 | int parse_hex_digit_table(const int ch) 61 | { 62 | unsigned char idx = (unsigned char)ch; 63 | return lookup_table[idx]; 64 | } 65 | 66 | int parse_hex_digit_table2(const int ch) 67 | { 68 | return lookup_table_int[ch]; 69 | } 70 | 71 | int parse_hex_digit3(const int ch) 72 | { 73 | return (ch >= '0' && ch <= '9') ? ch - '0' 74 | : (ch >= 'a' && ch <= 'f') ? ch - ('a' - 10) 75 | : (ch >= 'A' && ch <= 'F') ? ch - ('A' - 10) 76 | : -1; 77 | } 78 | 79 | int parse_hex_digit_table4(const int ch) 80 | { 81 | return lookup_table_add_one_int[ch] - 1; 82 | } 83 | 84 | int parse_hex_digit_table5(const int ch) 85 | { 86 | return lookup_table_add_one_byte[ch] - 1; 87 | } 88 | 89 | int parse_hex_digit_table6(const unsigned char ch) 90 | { 91 | return lookup_table_add_one_byte[ch] - 1; 92 | } 93 | 94 | int main() 95 | { 96 | const int N = 100000000; // Number of iterations 97 | int sum = 0; 98 | clock_t start, end; 99 | double cpu_time_used; 100 | 101 | // Prepare test data (mix of valid and invalid hex digits) 102 | char test_data[] = {'0', '9', 'A', 'F', 'a', 'f', 'G', 'z', '1', 'b', 'C', 'd'}; 103 | int data_size = sizeof(test_data)/sizeof(test_data[0]); 104 | 105 | // Benchmark parse_hex_digit 106 | sum = 0; 107 | start = clock(); 108 | for (int i = 0; i < N; i++) { 109 | sum += parse_hex_digit(test_data[i % data_size]); 110 | } 111 | end = clock(); 112 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 113 | printf("parse_hex_digit time: %f seconds, sum=%d\n", cpu_time_used, sum); 114 | 115 | // Benchmark parse_hex_digit_table 116 | sum = 0; 117 | start = clock(); 118 | for (int i = 0; i < N; i++) { 119 | sum += parse_hex_digit_table(test_data[i % data_size]); 120 | } 121 | end = clock(); 122 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 123 | printf("parse_hex_digit_table time: %f seconds, sum=%d\n", cpu_time_used, sum); 124 | 125 | // Benchmark parse_hex_digit_table2 126 | sum = 0; 127 | start = clock(); 128 | for (int i = 0; i < N; i++) { 129 | sum += parse_hex_digit_table2(test_data[i % data_size]); 130 | } 131 | end = clock(); 132 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 133 | printf("parse_hex_digit_table2 time: %f seconds, sum=%d\n", cpu_time_used, sum); 134 | 135 | // Benchmark parse_hex_digit3 136 | sum = 0; 137 | start = clock(); 138 | for (int i = 0; i < N; i++) { 139 | sum += parse_hex_digit3(test_data[i % data_size]); 140 | } 141 | end = clock(); 142 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 143 | printf("parse_hex_digit3 time: %f seconds, sum=%d\n", cpu_time_used, sum); 144 | 145 | // Benchmark parse_hex_digit_table4 146 | sum = 0; 147 | start = clock(); 148 | for (int i = 0; i < N; i++) { 149 | sum += parse_hex_digit_table4(test_data[i % data_size]); 150 | } 151 | end = clock(); 152 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 153 | printf("parse_hex_digit_table4 time: %f seconds, sum=%d\n", cpu_time_used, sum); 154 | 155 | // Benchmark parse_hex_digit_table5 156 | sum = 0; 157 | start = clock(); 158 | for (int i = 0; i < N; i++) { 159 | sum += parse_hex_digit_table5(test_data[i % data_size]); 160 | } 161 | end = clock(); 162 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 163 | printf("parse_hex_digit_table5 time: %f seconds, sum=%d\n", cpu_time_used, sum); 164 | 165 | // Benchmark parse_hex_digit_table6 166 | sum = 0; 167 | start = clock(); 168 | for (int i = 0; i < N; i++) { 169 | sum += parse_hex_digit_table6(test_data[i % data_size]); 170 | } 171 | end = clock(); 172 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 173 | printf("parse_hex_digit_table6 time: %f seconds, sum=%d\n", cpu_time_used, sum); 174 | 175 | // Benchmark lookup_table_int 176 | sum = 0; 177 | start = clock(); 178 | for (int i = 0; i < N; i++) { 179 | sum += lookup_table_int[test_data[i % data_size]]; 180 | } 181 | end = clock(); 182 | cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; 183 | printf("lookup_table_int time: %f seconds, sum=%d\n", cpu_time_used, sum); 184 | 185 | return 0; 186 | } 187 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | TinyXXD is dual licensed under GPL-2.0 (GPL-2.0-only) and the X11-MIT (MIT) license. 2 | 3 | The user can choose one or both of these licenses. 4 | 5 | From the original xxd.c source code: 6 | 7 | > (c) 1990-1998 by Juergen Weigert (jnweiger@gmail.com) 8 | > 9 | > I hereby grant permission to distribute and use xxd 10 | > under X11-MIT or GPL-2.0 (at the user's choice). 11 | 12 | Here is the MIT license. See AUTHORS.md for who the TinyXXD authors are. 13 | 14 | Copyright (C) 2024 the TinyXXD authors 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | Except as contained in this notice, the names of the TinyXXD authors shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the TinyXXD authors. 23 | 24 | And here is the GPL-2.0-only license: 25 | 26 | GNU GENERAL PUBLIC LICENSE 27 | Version 2, June 1991 28 | 29 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 30 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 31 | Everyone is permitted to copy and distribute verbatim copies 32 | of this license document, but changing it is not allowed. 33 | 34 | Preamble 35 | 36 | The licenses for most software are designed to take away your 37 | freedom to share and change it. By contrast, the GNU General Public 38 | License is intended to guarantee your freedom to share and change free 39 | software--to make sure the software is free for all its users. This 40 | General Public License applies to most of the Free Software 41 | Foundation's software and to any other program whose authors commit to 42 | using it. (Some other Free Software Foundation software is covered by 43 | the GNU Lesser General Public License instead.) You can apply it to 44 | your programs, too. 45 | 46 | When we speak of free software, we are referring to freedom, not 47 | price. Our General Public Licenses are designed to make sure that you 48 | have the freedom to distribute copies of free software (and charge for 49 | this service if you wish), that you receive source code or can get it 50 | if you want it, that you can change the software or use pieces of it 51 | in new free programs; and that you know you can do these things. 52 | 53 | To protect your rights, we need to make restrictions that forbid 54 | anyone to deny you these rights or to ask you to surrender the rights. 55 | These restrictions translate to certain responsibilities for you if you 56 | distribute copies of the software, or if you modify it. 57 | 58 | For example, if you distribute copies of such a program, whether 59 | gratis or for a fee, you must give the recipients all the rights that 60 | you have. You must make sure that they, too, receive or can get the 61 | source code. And you must show them these terms so they know their 62 | rights. 63 | 64 | We protect your rights with two steps: (1) copyright the software, and 65 | (2) offer you this license which gives you legal permission to copy, 66 | distribute and/or modify the software. 67 | 68 | Also, for each author's protection and ours, we want to make certain 69 | that everyone understands that there is no warranty for this free 70 | software. If the software is modified by someone else and passed on, we 71 | want its recipients to know that what they have is not the original, so 72 | that any problems introduced by others will not reflect on the original 73 | authors' reputations. 74 | 75 | Finally, any free program is threatened constantly by software 76 | patents. We wish to avoid the danger that redistributors of a free 77 | program will individually obtain patent licenses, in effect making the 78 | program proprietary. To prevent this, we have made it clear that any 79 | patent must be licensed for everyone's free use or not licensed at all. 80 | 81 | The precise terms and conditions for copying, distribution and 82 | modification follow. 83 | 84 | GNU GENERAL PUBLIC LICENSE 85 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 86 | 87 | 0. This License applies to any program or other work which contains 88 | a notice placed by the copyright holder saying it may be distributed 89 | under the terms of this General Public License. The "Program", below, 90 | refers to any such program or work, and a "work based on the Program" 91 | means either the Program or any derivative work under copyright law: 92 | that is to say, a work containing the Program or a portion of it, 93 | either verbatim or with modifications and/or translated into another 94 | language. (Hereinafter, translation is included without limitation in 95 | the term "modification".) Each licensee is addressed as "you". 96 | 97 | Activities other than copying, distribution and modification are not 98 | covered by this License; they are outside its scope. The act of 99 | running the Program is not restricted, and the output from the Program 100 | is covered only if its contents constitute a work based on the 101 | Program (independent of having been made by running the Program). 102 | Whether that is true depends on what the Program does. 103 | 104 | 1. You may copy and distribute verbatim copies of the Program's 105 | source code as you receive it, in any medium, provided that you 106 | conspicuously and appropriately publish on each copy an appropriate 107 | copyright notice and disclaimer of warranty; keep intact all the 108 | notices that refer to this License and to the absence of any warranty; 109 | and give any other recipients of the Program a copy of this License 110 | along with the Program. 111 | 112 | You may charge a fee for the physical act of transferring a copy, and 113 | you may at your option offer warranty protection in exchange for a fee. 114 | 115 | 2. You may modify your copy or copies of the Program or any portion 116 | of it, thus forming a work based on the Program, and copy and 117 | distribute such modifications or work under the terms of Section 1 118 | above, provided that you also meet all of these conditions: 119 | 120 | a) You must cause the modified files to carry prominent notices 121 | stating that you changed the files and the date of any change. 122 | 123 | b) You must cause any work that you distribute or publish, that in 124 | whole or in part contains or is derived from the Program or any 125 | part thereof, to be licensed as a whole at no charge to all third 126 | parties under the terms of this License. 127 | 128 | c) If the modified program normally reads commands interactively 129 | when run, you must cause it, when started running for such 130 | interactive use in the most ordinary way, to print or display an 131 | announcement including an appropriate copyright notice and a 132 | notice that there is no warranty (or else, saying that you provide 133 | a warranty) and that users may redistribute the program under 134 | these conditions, and telling the user how to view a copy of this 135 | License. (Exception: if the Program itself is interactive but 136 | does not normally print such an announcement, your work based on 137 | the Program is not required to print an announcement.) 138 | 139 | These requirements apply to the modified work as a whole. If 140 | identifiable sections of that work are not derived from the Program, 141 | and can be reasonably considered independent and separate works in 142 | themselves, then this License, and its terms, do not apply to those 143 | sections when you distribute them as separate works. But when you 144 | distribute the same sections as part of a whole which is a work based 145 | on the Program, the distribution of the whole must be on the terms of 146 | this License, whose permissions for other licensees extend to the 147 | entire whole, and thus to each and every part regardless of who wrote it. 148 | 149 | Thus, it is not the intent of this section to claim rights or contest 150 | your rights to work written entirely by you; rather, the intent is to 151 | exercise the right to control the distribution of derivative or 152 | collective works based on the Program. 153 | 154 | In addition, mere aggregation of another work not based on the Program 155 | with the Program (or with a work based on the Program) on a volume of 156 | a storage or distribution medium does not bring the other work under 157 | the scope of this License. 158 | 159 | 3. You may copy and distribute the Program (or a work based on it, 160 | under Section 2) in object code or executable form under the terms of 161 | Sections 1 and 2 above provided that you also do one of the following: 162 | 163 | a) Accompany it with the complete corresponding machine-readable 164 | source code, which must be distributed under the terms of Sections 165 | 1 and 2 above on a medium customarily used for software interchange; or, 166 | 167 | b) Accompany it with a written offer, valid for at least three 168 | years, to give any third party, for a charge no more than your 169 | cost of physically performing source distribution, a complete 170 | machine-readable copy of the corresponding source code, to be 171 | distributed under the terms of Sections 1 and 2 above on a medium 172 | customarily used for software interchange; or, 173 | 174 | c) Accompany it with the information you received as to the offer 175 | to distribute corresponding source code. (This alternative is 176 | allowed only for noncommercial distribution and only if you 177 | received the program in object code or executable form with such 178 | an offer, in accord with Subsection b above.) 179 | 180 | The source code for a work means the preferred form of the work for 181 | making modifications to it. For an executable work, complete source 182 | code means all the source code for all modules it contains, plus any 183 | associated interface definition files, plus the scripts used to 184 | control compilation and installation of the executable. However, as a 185 | special exception, the source code distributed need not include 186 | anything that is normally distributed (in either source or binary 187 | form) with the major components (compiler, kernel, and so on) of the 188 | operating system on which the executable runs, unless that component 189 | itself accompanies the executable. 190 | 191 | If distribution of executable or object code is made by offering 192 | access to copy from a designated place, then offering equivalent 193 | access to copy the source code from the same place counts as 194 | distribution of the source code, even though third parties are not 195 | compelled to copy the source along with the object code. 196 | 197 | 4. You may not copy, modify, sublicense, or distribute the Program 198 | except as expressly provided under this License. Any attempt 199 | otherwise to copy, modify, sublicense or distribute the Program is 200 | void, and will automatically terminate your rights under this License. 201 | However, parties who have received copies, or rights, from you under 202 | this License will not have their licenses terminated so long as such 203 | parties remain in full compliance. 204 | 205 | 5. You are not required to accept this License, since you have not 206 | signed it. However, nothing else grants you permission to modify or 207 | distribute the Program or its derivative works. These actions are 208 | prohibited by law if you do not accept this License. Therefore, by 209 | modifying or distributing the Program (or any work based on the 210 | Program), you indicate your acceptance of this License to do so, and 211 | all its terms and conditions for copying, distributing or modifying 212 | the Program or works based on it. 213 | 214 | 6. Each time you redistribute the Program (or any work based on the 215 | Program), the recipient automatically receives a license from the 216 | original licensor to copy, distribute or modify the Program subject to 217 | these terms and conditions. You may not impose any further 218 | restrictions on the recipients' exercise of the rights granted herein. 219 | You are not responsible for enforcing compliance by third parties to 220 | this License. 221 | 222 | 7. If, as a consequence of a court judgment or allegation of patent 223 | infringement or for any other reason (not limited to patent issues), 224 | conditions are imposed on you (whether by court order, agreement or 225 | otherwise) that contradict the conditions of this License, they do not 226 | excuse you from the conditions of this License. If you cannot 227 | distribute so as to satisfy simultaneously your obligations under this 228 | License and any other pertinent obligations, then as a consequence you 229 | may not distribute the Program at all. For example, if a patent 230 | license would not permit royalty-free redistribution of the Program by 231 | all those who receive copies directly or indirectly through you, then 232 | the only way you could satisfy both it and this License would be to 233 | refrain entirely from distribution of the Program. 234 | 235 | If any portion of this section is held invalid or unenforceable under 236 | any particular circumstance, the balance of the section is intended to 237 | apply and the section as a whole is intended to apply in other 238 | circumstances. 239 | 240 | It is not the purpose of this section to induce you to infringe any 241 | patents or other property right claims or to contest validity of any 242 | such claims; this section has the sole purpose of protecting the 243 | integrity of the free software distribution system, which is 244 | implemented by public license practices. Many people have made 245 | generous contributions to the wide range of software distributed 246 | through that system in reliance on consistent application of that 247 | system; it is up to the author/donor to decide if he or she is willing 248 | to distribute software through any other system and a licensee cannot 249 | impose that choice. 250 | 251 | This section is intended to make thoroughly clear what is believed to 252 | be a consequence of the rest of this License. 253 | 254 | 8. If the distribution and/or use of the Program is restricted in 255 | certain countries either by patents or by copyrighted interfaces, the 256 | original copyright holder who places the Program under this License 257 | may add an explicit geographical distribution limitation excluding 258 | those countries, so that distribution is permitted only in or among 259 | countries not thus excluded. In such case, this License incorporates 260 | the limitation as if written in the body of this License. 261 | 262 | 9. The Free Software Foundation may publish revised and/or new versions 263 | of the General Public License from time to time. Such new versions will 264 | be similar in spirit to the present version, but may differ in detail to 265 | address new problems or concerns. 266 | 267 | Each version is given a distinguishing version number. If the Program 268 | specifies a version number of this License which applies to it and "any 269 | later version", you have the option of following the terms and conditions 270 | either of that version or of any later version published by the Free 271 | Software Foundation. If the Program does not specify a version number of 272 | this License, you may choose any version ever published by the Free Software 273 | Foundation. 274 | 275 | 10. If you wish to incorporate parts of the Program into other free 276 | programs whose distribution conditions are different, write to the author 277 | to ask for permission. For software which is copyrighted by the Free 278 | Software Foundation, write to the Free Software Foundation; we sometimes 279 | make exceptions for this. Our decision will be guided by the two goals 280 | of preserving the free status of all derivatives of our free software and 281 | of promoting the sharing and reuse of software generally. 282 | 283 | NO WARRANTY 284 | 285 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 286 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 287 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 288 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 289 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 290 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 291 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 292 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 293 | REPAIR OR CORRECTION. 294 | 295 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 296 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 297 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 298 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 299 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 300 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 301 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 302 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 303 | POSSIBILITY OF SUCH DAMAGES. 304 | 305 | END OF TERMS AND CONDITIONS 306 | 307 | How to Apply These Terms to Your New Programs 308 | 309 | If you develop a new program, and you want it to be of the greatest 310 | possible use to the public, the best way to achieve this is to make it 311 | free software which everyone can redistribute and change under these terms. 312 | 313 | To do so, attach the following notices to the program. It is safest 314 | to attach them to the start of each source file to most effectively 315 | convey the exclusion of warranty; and each file should have at least 316 | the "copyright" line and a pointer to where the full notice is found. 317 | 318 | 319 | Copyright (C) 320 | 321 | This program is free software; you can redistribute it and/or modify 322 | it under the terms of the GNU General Public License as published by 323 | the Free Software Foundation; either version 2 of the License, or 324 | (at your option) any later version. 325 | 326 | This program is distributed in the hope that it will be useful, 327 | but WITHOUT ANY WARRANTY; without even the implied warranty of 328 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 329 | GNU General Public License for more details. 330 | 331 | You should have received a copy of the GNU General Public License along 332 | with this program; if not, write to the Free Software Foundation, Inc., 333 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 334 | 335 | Also add information on how to contact you by electronic and paper mail. 336 | 337 | If the program is interactive, make it output a short notice like this 338 | when it starts in an interactive mode: 339 | 340 | Gnomovision version 69, Copyright (C) year name of author 341 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 342 | This is free software, and you are welcome to redistribute it 343 | under certain conditions; type `show c' for details. 344 | 345 | The hypothetical commands `show w' and `show c' should show the appropriate 346 | parts of the General Public License. Of course, the commands you use may 347 | be called something other than `show w' and `show c'; they could even be 348 | mouse-clicks or menu items--whatever suits your program. 349 | 350 | You should also get your employer (if you work as a programmer) or your 351 | school, if any, to sign a "copyright disclaimer" for the program, if 352 | necessary. Here is a sample; alter the names: 353 | 354 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 355 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 356 | 357 | , 1 April 1989 358 | Ty Coon, President of Vice 359 | 360 | This General Public License does not permit incorporating your program into 361 | proprietary programs. If your program is a subroutine library, you may 362 | consider it more useful to permit linking proprietary applications with the 363 | library. If this is what you want to do, use the GNU Lesser General 364 | Public License instead of this License. 365 | -------------------------------------------------------------------------------- /img/graph_flag_none.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Gnuplot 10 | Produced by GNUPLOT 6.0 patchlevel 3 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 0.5 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 1 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 1.5 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 2 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 2.5 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 0 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 10 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 20 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 30 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 40 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 50 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 60 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 70 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | xxd 233 | 234 | 235 | xxd 236 | 237 | 238 | 239 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | tinyxxd 251 | 252 | 253 | tinyxxd 254 | 255 | 256 | 257 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | previous tinyxxd 269 | 270 | 271 | previous tinyxxd 272 | 273 | 274 | 275 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | Time (seconds) 295 | 296 | 297 | 298 | 299 | Sample size (MiB) 300 | 301 | 302 | 303 | 304 | 305 | 306 | Benchmark results for no flag 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | -------------------------------------------------------------------------------- /img/graph_flag_p.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Gnuplot 10 | Produced by GNUPLOT 6.0 patchlevel 3 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 0.2 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 0.4 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 0.6 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 0.8 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 1 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 1.2 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 0 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 10 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 20 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 30 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 40 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 50 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 60 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 70 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | xxd 246 | 247 | 248 | xxd 249 | 250 | 251 | 252 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | tinyxxd 264 | 265 | 266 | tinyxxd 267 | 268 | 269 | 270 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | previous tinyxxd 282 | 283 | 284 | previous tinyxxd 285 | 286 | 287 | 288 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | Time (seconds) 308 | 309 | 310 | 311 | 312 | Sample size (MiB) 313 | 314 | 315 | 316 | 317 | 318 | 319 | Benchmark results for flag -p 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | -------------------------------------------------------------------------------- /img/graph_flag_b_i.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Gnuplot 10 | Produced by GNUPLOT 6.0 patchlevel 3 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 1 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 2 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 3 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 4 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 5 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 6 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 0 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 10 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 20 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 30 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 40 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 50 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 60 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 70 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | xxd 246 | 247 | 248 | xxd 249 | 250 | 251 | 252 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | tinyxxd 264 | 265 | 266 | tinyxxd 267 | 268 | 269 | 270 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | previous tinyxxd 282 | 283 | 284 | previous tinyxxd 285 | 286 | 287 | 288 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | Time (seconds) 308 | 309 | 310 | 311 | 312 | Sample size (MiB) 313 | 314 | 315 | 316 | 317 | 318 | 319 | Benchmark results for flag -b-i 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | -------------------------------------------------------------------------------- /img/graph_flag_b.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Gnuplot 10 | Produced by GNUPLOT 6.0 patchlevel 3 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 0.5 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 1 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 1.5 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 2 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 2.5 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 3 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 3.5 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 0 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 10 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 20 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 30 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 40 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 50 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 60 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 70 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | xxd 259 | 260 | 261 | xxd 262 | 263 | 264 | 265 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | tinyxxd 277 | 278 | 279 | tinyxxd 280 | 281 | 282 | 283 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | previous tinyxxd 295 | 296 | 297 | previous tinyxxd 298 | 299 | 300 | 301 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | Time (seconds) 321 | 322 | 323 | 324 | 325 | Sample size (MiB) 326 | 327 | 328 | 329 | 330 | 331 | 332 | Benchmark results for flag -b 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | -------------------------------------------------------------------------------- /img/graph_flag_e.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Gnuplot 10 | Produced by GNUPLOT 6.0 patchlevel 3 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 0.2 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 0.4 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 0.6 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 0.8 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 1 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 1.2 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 1.4 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 0 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 10 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 20 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 30 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 40 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 50 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 60 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 70 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | xxd 259 | 260 | 261 | xxd 262 | 263 | 264 | 265 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | tinyxxd 277 | 278 | 279 | tinyxxd 280 | 281 | 282 | 283 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | previous tinyxxd 295 | 296 | 297 | previous tinyxxd 298 | 299 | 300 | 301 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | Time (seconds) 321 | 322 | 323 | 324 | 325 | Sample size (MiB) 326 | 327 | 328 | 329 | 330 | 331 | 332 | Benchmark results for flag -e 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | -------------------------------------------------------------------------------- /img/graph_flag_u.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Gnuplot 10 | Produced by GNUPLOT 6.0 patchlevel 3 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 0.2 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 0.4 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 0.6 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 0.8 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 1 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 1.2 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 1.4 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 0 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 10 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 20 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 30 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 40 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 50 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 60 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 70 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | xxd 259 | 260 | 261 | xxd 262 | 263 | 264 | 265 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | tinyxxd 277 | 278 | 279 | tinyxxd 280 | 281 | 282 | 283 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | previous tinyxxd 295 | 296 | 297 | previous tinyxxd 298 | 299 | 300 | 301 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | Time (seconds) 321 | 322 | 323 | 324 | 325 | Sample size (MiB) 326 | 327 | 328 | 329 | 330 | 331 | 332 | Benchmark results for flag -u 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | -------------------------------------------------------------------------------- /img/graph_by_size.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Gnuplot 10 | Produced by GNUPLOT 6.0 patchlevel 3 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 0.2 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 0.4 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 0.6 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 0.8 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 1 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 1.2 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 1.4 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 0 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 10 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 20 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 30 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 40 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 50 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 60 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 70 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | xxd 259 | 260 | 261 | xxd 262 | 263 | 264 | 265 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | tinyxxd 277 | 278 | 279 | tinyxxd 280 | 281 | 282 | 283 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | previous tinyxxd 295 | 296 | 297 | previous tinyxxd 298 | 299 | 300 | 301 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | Time (seconds) 321 | 322 | 323 | 324 | 325 | Sample size (MiB) 326 | 327 | 328 | 329 | 330 | 331 | 332 | Benchmark results by sample size 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | --------------------------------------------------------------------------------