Commit Graph
42 Commits
Author SHA1 Message Date
Nigel Tao 3c708dfe59 Rename PUFFS to WUFFS, part 7 of N 2017-11-30 18:02:59 +11:00
Nigel Tao 79a94558be Rename PUFFS to WUFFS, part 5 of N 2017-11-30 16:37:20 +11:00
Nigel Tao 66047db6d8 Be more paranoid about calling strncmp. 2017-11-04 10:49:23 +11:00
Nigel Tao 6602dea7be Make focus's "/gcc" suffix optional. 2017-11-04 10:40:43 +11:00
Nigel Tao 4729170678 Make focus's "Benchmark" prefix optional. 2017-11-04 10:25:24 +11:00
Nigel Tao 0230a65c7b Let focus have a trailing comma. 2017-11-04 10:21:32 +11:00
Nigel Tao c62aa518a5 Make focus's "test_" or "bench_" prefix optional. 2017-11-04 10:05:37 +11:00
Nigel Tao 1487da7af8 Add a -focus flag. 2017-11-03 17:54:29 +11:00
Nigel Tao aec5715f12 Declare proc_filename exactly once. 2017-11-03 15:09:22 +11:00
Nigel Tao d7c910fd1b Avoid "array decl needs an explicit size". 2017-11-03 12:11:21 +11:00
Nigel Tao 0e136f59af Use an explicitly typed tc_neither. 2017-11-03 11:18:38 +11:00
Nigel Tao b7f347d406 Fix a "return false as char*" typo. 2017-11-03 11:15:38 +11:00
Nigel Tao f29c4e278f Follow the pkg__type__method convention for base. 2017-10-21 15:59:08 +11:00
Nigel Tao fca0cab724 Add write and read limits to some tests. 2017-10-14 14:52:54 +11:00
Nigel Tao d4372cb5b8 Change license to Apache 2.
Also remove explicit PATENTS file. The new LICENSE file already
discusses patents.

Note that the Puffs project has not yet been publicly released.
2017-10-12 11:17:41 +11:00
Nigel Tao ac405d485b Rename some internal test functions. 2017-10-07 15:57:18 +11:00
Nigel Tao 04e8a73d10 Update std/flate's decoder.history_index. 2017-09-30 11:56:30 +10:00
Nigel Tao e0f87fb2a7 Add a -reps=N flag to "puffs bench". 2017-07-30 08:27:52 +10:00
Nigel Tao c463f4956f Add script/print-bits.go. 2017-07-17 17:28:19 +10:00
Nigel Tao 1e39d0302a Have "puffs bench" show the compiler version. 2017-07-16 23:47:04 +10:00
Nigel Tao 4b4473cc91 Flush "puffs bench"'s stdout. 2017-07-16 23:27:36 +10:00
Nigel Tao 85610b5df2 Add a throughput_counter concept.
Example benchstat summary of "puffs bench -mimic" output below, with
some blank lines added for clarity.

For example, gzip and zlib both add a checksum (crc32 and adler32
respectively) to raw flate. The headline mimic_{gzip,zlib}_decode_100k
numbers are 386µs and 347µs per op. Subtracting 73.2µs and 34.3µs for
the checksum times from the headline times give the same number: 313µs.

This 313µs differs from 358µs for raw flate (mimic_flate_decode_100k)
because zlib takes two different code paths for wrapped vs raw flate. In
the zlib source code, this is inflate.c vs infback.c respectively.

----
name                             time/op

mimic_adler32_10k/clang            3.74µs ± 1%
mimic_adler32_100k/clang           34.3µs ± 1%
mimic_crc32_10k/clang              8.10µs ± 1%
mimic_crc32_100k/clang             73.2µs ± 0%

mimic_flate_decode_1k/clang        4.31µs ± 1%
mimic_flate_decode_10k/clang       42.1µs ± 1%
mimic_flate_decode_100k/clang       358µs ± 1%
mimic_gzip_decode_10k/clang        49.8µs ± 1%
mimic_gzip_decode_100k/clang        386µs ± 0%
mimic_zlib_decode_10k/clang        45.3µs ± 0%
mimic_zlib_decode_100k/clang        347µs ± 1%

mimic_adler32_10k/gcc              3.72µs ± 1%
mimic_adler32_100k/gcc             34.3µs ± 2%
mimic_crc32_10k/gcc                8.06µs ± 0%
mimic_crc32_100k/gcc               73.1µs ± 0%

mimic_flate_decode_1k/gcc          4.26µs ± 0%
mimic_flate_decode_10k/gcc         42.0µs ± 0%
mimic_flate_decode_100k/gcc         356µs ± 0%
mimic_gzip_decode_10k/gcc          50.4µs ± 4%
mimic_gzip_decode_100k/gcc          390µs ± 2%
mimic_zlib_decode_10k/gcc          45.6µs ± 1%
mimic_zlib_decode_100k/gcc          348µs ± 1%

puffs_gif_lzw_decode_20k/clang      151µs ± 0%
puffs_gif_lzw_decode_100k/clang     566µs ± 0%
puffs_gif_decode_1k/clang          2.74µs ± 1%
puffs_gif_decode_10k/clang         73.8µs ± 0%
puffs_gif_decode_100k/clang        1.13ms ± 0%
puffs_gif_decode_1000k/clang       7.99ms ± 0%

mimic_gif_decode_1k/clang          6.44µs ± 0%
mimic_gif_decode_10k/clang          107µs ± 0%
mimic_gif_decode_100k/clang        1.38ms ± 0%
mimic_gif_decode_1000k/clang       9.79ms ± 0%

puffs_gif_lzw_decode_20k/gcc        127µs ± 0%
puffs_gif_lzw_decode_100k/gcc       501µs ± 0%
puffs_gif_decode_1k/gcc            2.45µs ± 1%
puffs_gif_decode_10k/gcc           65.1µs ± 0%
puffs_gif_decode_100k/gcc          1.01ms ± 0%
puffs_gif_decode_1000k/gcc         7.16ms ± 1%

mimic_gif_decode_1k/gcc            6.66µs ± 2%
mimic_gif_decode_10k/gcc            108µs ± 1%
mimic_gif_decode_100k/gcc          1.39ms ± 0%
mimic_gif_decode_1000k/gcc         9.93ms ± 1%

name                             speed

mimic_adler32_10k/clang          2.96GB/s ± 1%
mimic_adler32_100k/clang         2.91GB/s ± 1%
mimic_crc32_10k/clang            1.37GB/s ± 1%
mimic_crc32_100k/clang           1.37GB/s ± 0%

mimic_flate_decode_1k/clang       219MB/s ± 1%
mimic_flate_decode_10k/clang      263MB/s ± 1%
mimic_flate_decode_100k/clang     280MB/s ± 1%
mimic_gzip_decode_10k/clang       222MB/s ± 1%
mimic_gzip_decode_100k/clang      259MB/s ± 0%
mimic_zlib_decode_10k/clang       244MB/s ± 0%
mimic_zlib_decode_100k/clang      288MB/s ± 1%

mimic_adler32_10k/gcc            2.97GB/s ± 1%
mimic_adler32_100k/gcc           2.92GB/s ± 2%
mimic_crc32_10k/gcc              1.37GB/s ± 0%
mimic_crc32_100k/gcc             1.37GB/s ± 0%

mimic_flate_decode_1k/gcc         221MB/s ± 0%
mimic_flate_decode_10k/gcc        264MB/s ± 0%
mimic_flate_decode_100k/gcc       281MB/s ± 0%
mimic_gzip_decode_10k/gcc         219MB/s ± 4%
mimic_gzip_decode_100k/gcc        256MB/s ± 2%
mimic_zlib_decode_10k/gcc         243MB/s ± 1%
mimic_zlib_decode_100k/gcc        287MB/s ± 1%

puffs_gif_lzw_decode_20k/clang    128MB/s ± 0%
puffs_gif_lzw_decode_100k/clang   177MB/s ± 0%
puffs_gif_decode_1k/clang         373MB/s ± 1%
puffs_gif_decode_10k/clang        137MB/s ± 0%
puffs_gif_decode_100k/clang       122MB/s ± 0%
puffs_gif_decode_1000k/clang      125MB/s ± 0%

mimic_gif_decode_1k/clang         159MB/s ± 0%
mimic_gif_decode_10k/clang       94.2MB/s ± 0%
mimic_gif_decode_100k/clang       100MB/s ± 0%
mimic_gif_decode_1000k/clang      102MB/s ± 0%

puffs_gif_lzw_decode_20k/gcc      151MB/s ± 0%
puffs_gif_lzw_decode_100k/gcc     200MB/s ± 0%
puffs_gif_decode_1k/gcc           418MB/s ± 1%
puffs_gif_decode_10k/gcc          155MB/s ± 0%
puffs_gif_decode_100k/gcc         137MB/s ± 0%
puffs_gif_decode_1000k/gcc        140MB/s ± 1%

mimic_gif_decode_1k/gcc           154MB/s ± 2%
mimic_gif_decode_10k/gcc         93.0MB/s ± 1%
mimic_gif_decode_100k/gcc        98.9MB/s ± 0%
mimic_gif_decode_1000k/gcc        101MB/s ± 1%
----
2017-07-14 13:09:45 +10:00
Nigel Tao 8be6dc3394 Add adler32 and crc32 benchmarks. 2017-07-14 13:01:08 +10:00
Nigel Tao 0561297826 Increase soem testlib buffer sizes. 2017-07-07 12:08:56 +10:00
Nigel Tao 0b9f9162a5 Add std/flate tests. 2017-07-07 12:06:54 +10:00
Nigel Tao ed6c642f98 Strip the "bench_" from "Benchmarkbench_etc". 2017-07-02 11:49:34 +10:00
Nigel Tao 11f4cfeb49 Fix C for loop initializer style nit. 2017-06-30 11:46:04 +10:00
Nigel Tao 0cba6885fa Spell the "-b" flag fully, as "-bench". 2017-06-30 08:50:12 +10:00
Nigel Tao 84b3e6e5c2 Make benchmark suffixes "/gcc" not "_gcc". 2017-06-30 08:35:14 +10:00
Nigel Tao 9e59fd1202 Add instructions to install benchstat. 2017-06-30 08:33:06 +10:00
Nigel Tao 0203d2f148 Compile with gcc without -std=c99. 2017-06-29 16:27:04 +10:00
Nigel Tao 480c509214 Add benchmarks. 2017-06-29 14:13:23 +10:00
Nigel Tao 0088c7e257 Have read_u8 honor the limit. 2017-06-23 10:01:31 +10:00
Nigel Tao d16a25806f Decode a GIF's Global Color Table. 2017-06-18 11:11:10 +10:00
Nigel Tao b3c12e05cf Add a buf1.closed field. 2017-06-15 11:50:48 +10:00
Nigel Tao e5736cadf6 Set a default test_funcname. 2017-06-11 12:04:46 +10:00
Nigel Tao f403d0faa8 Generate C code for "in.dst.write?(etc)". 2017-06-10 17:28:35 +10:00
Nigel Tao 88e2d4cf59 Refactor testlib's funcname handling. 2017-06-10 15:34:13 +10:00
Nigel Tao 45cecca79a Rename buf1's cap to len. 2017-06-06 17:29:50 +10:00
Nigel Tao f9de8950e4 Add read_file to testlib.c. 2017-06-03 18:33:22 +10:00
Nigel Tao 71a3ad6563 Tweak the test output. 2017-05-27 09:18:59 +10:00
Nigel Tao 9724466233 Add a basic test framework. 2017-05-26 17:14:48 +10:00