Skip to content

Instantly share code, notes, and snippets.

@michalmuskala
Created February 15, 2024 17:49
Show Gist options
  • Save michalmuskala/3e709dc20839bf5159e7fd967e46d0bf to your computer and use it in GitHub Desktop.
Save michalmuskala/3e709dc20839bf5159e7fd967e46d0bf to your computer and use it in GitHub Desktop.
Operating System: macOS
CPU Information: Apple M1 Max
Number of Available Cores: 10
Available memory: 32 GB
Elixir 1.16.0
Erlang 27
JIT enabled: true
Benchmark suite executing with the following configuration:
warmup: 1 s
time: 10 s
memory time: 100 ms
reduction time: 0 ns
parallel: 1
inputs: Blockchain, Canada, Giphy, GitHub, GovTrack, Issue 90, JSON Generator, Pokedex, UTF-8 unescaped
Estimated total run time: 6 min 39 s 600 ms
Benchmarking Jason with input Blockchain ...
Benchmarking Jason with input Canada ...
Benchmarking Jason with input Giphy ...
Benchmarking Jason with input GitHub ...
Benchmarking Jason with input GovTrack ...
Benchmarking Jason with input Issue 90 ...
Benchmarking Jason with input JSON Generator ...
Benchmarking Jason with input Pokedex ...
Benchmarking Jason with input UTF-8 unescaped ...
Benchmarking jiffy with input Blockchain ...
Benchmarking jiffy with input Canada ...
Benchmarking jiffy with input Giphy ...
Benchmarking jiffy with input GitHub ...
Benchmarking jiffy with input GovTrack ...
Benchmarking jiffy with input Issue 90 ...
Benchmarking jiffy with input JSON Generator ...
Benchmarking jiffy with input Pokedex ...
Benchmarking jiffy with input UTF-8 unescaped ...
Benchmarking json with input Blockchain ...
Benchmarking json with input Canada ...
Benchmarking json with input Giphy ...
Benchmarking json with input GitHub ...
Benchmarking json with input GovTrack ...
Benchmarking json with input Issue 90 ...
Benchmarking json with input JSON Generator ...
Benchmarking json with input Pokedex ...
Benchmarking json with input UTF-8 unescaped ...
Benchmarking jsone with input Blockchain ...
Benchmarking jsone with input Canada ...
Benchmarking jsone with input Giphy ...
Benchmarking jsone with input GitHub ...
Benchmarking jsone with input GovTrack ...
Benchmarking jsone with input Issue 90 ...
Benchmarking jsone with input JSON Generator ...
Benchmarking jsone with input Pokedex ...
Benchmarking jsone with input UTF-8 unescaped ...
Calculating statistics...
Formatting results...
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_blockchain_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_blockchain_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_blockchain_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_blockchain_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_blockchain_jsone.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_canada_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_canada_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_canada_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_canada_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_canada_jsone.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_giphy_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_giphy_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_giphy_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_giphy_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_giphy_jsone.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_github_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_github_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_github_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_github_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_github_jsone.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_govtrack_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_govtrack_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_govtrack_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_govtrack_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_govtrack_jsone.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_issue_90_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_issue_90_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_issue_90_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_issue_90_jsone.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_issue_90_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_json_generator_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_json_generator_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_json_generator_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_json_generator_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_json_generator_jsone.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_pokedex_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_pokedex_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_pokedex_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_pokedex_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_pokedex_jsone.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_utf_8_unescaped_comparison.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_utf_8_unescaped_jiffy.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_utf_8_unescaped_json.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_utf_8_unescaped_jason.html
Generated /Users/micmus/github/michalmuskala/jason/bench/output/encode_utf_8_unescaped_jsone.html
Opened report using open
##### With input Blockchain #####
Name ips average deviation median 99th %
json 40.31 K 24.81 μs ±21.74% 24 μs 37.42 μs
Jason 21.89 K 45.68 μs ±9.89% 42.83 μs 57.50 μs
jiffy 21.56 K 46.38 μs ±8.29% 45.08 μs 55.96 μs
jsone 12.94 K 77.27 μs ±11.41% 75.17 μs 121.08 μs
Comparison:
json 40.31 K
Jason 21.89 K - 1.84x slower +20.87 μs
jiffy 21.56 K - 1.87x slower +21.58 μs
jsone 12.94 K - 3.11x slower +52.47 μs
Memory usage statistics:
Name Memory usage
json 82.64 KB
Jason 78.91 KB - 0.95x memory usage -3.73438 KB
jiffy 7.79 KB - 0.09x memory usage -74.85156 KB
jsone 179.20 KB - 2.17x memory usage +96.56 KB
**All measurements for memory usage were the same**
##### With input Canada #####
Name ips average deviation median 99th %
json 162.06 6.17 ms ±6.91% 6.12 ms 7.91 ms
Jason 146.24 6.84 ms ±20.72% 6.34 ms 10.53 ms
jiffy 71.49 13.99 ms ±1.68% 13.89 ms 15.05 ms
jsone 14.77 67.71 ms ±4.12% 67.60 ms 82.66 ms
Comparison:
json 162.06
Jason 146.24 - 1.11x slower +0.67 ms
jiffy 71.49 - 2.27x slower +7.82 ms
jsone 14.77 - 10.97x slower +61.54 ms
Memory usage statistics:
Name Memory usage
json 9.22 MB
Jason 9.22 MB - 1.00x memory usage -0.00007 MB
jiffy 0.101 MB - 0.01x memory usage -9.12333 MB
jsone 24.22 MB - 2.63x memory usage +15.00 MB
**All measurements for memory usage were the same**
##### With input Giphy #####
Name ips average deviation median 99th %
json 2.17 K 460.21 μs ±28.85% 423.37 μs 1001.34 μs
jiffy 1.97 K 507.78 μs ±21.47% 470.70 μs 638.25 μs
Jason 1.28 K 779.18 μs ±25.49% 818.75 μs 1032.49 μs
jsone 0.59 K 1699.98 μs ±12.74% 1741.63 μs 2104.46 μs
Comparison:
json 2.17 K
jiffy 1.97 K - 1.10x slower +47.57 μs
Jason 1.28 K - 1.69x slower +318.97 μs
jsone 0.59 K - 3.69x slower +1239.76 μs
Memory usage statistics:
Name Memory usage
json 872.21 KB
jiffy 163.12 KB - 0.19x memory usage -709.09375 KB
Jason 861.52 KB - 0.99x memory usage -10.69531 KB
jsone 2239.45 KB - 2.57x memory usage +1367.23 KB
**All measurements for memory usage were the same**
##### With input GitHub #####
Name ips average deviation median 99th %
json 5.84 K 171.23 μs ±49.90% 165.33 μs 353.08 μs
jiffy 5.48 K 182.48 μs ±21.96% 169.96 μs 382.19 μs
Jason 4.88 K 204.92 μs ±37.93% 162.92 μs 396.20 μs
jsone 1.83 K 546.18 μs ±12.28% 537.03 μs 700.03 μs
Comparison:
json 5.84 K
jiffy 5.48 K - 1.07x slower +11.25 μs
Jason 4.88 K - 1.20x slower +33.69 μs
jsone 1.83 K - 3.19x slower +374.95 μs
Memory usage statistics:
Name Memory usage
json 226.98 KB
jiffy 43.23 KB - 0.19x memory usage -183.75781 KB
Jason 221.14 KB - 0.97x memory usage -5.84375 KB
jsone 683.46 KB - 3.01x memory usage +456.48 KB
**All measurements for memory usage were the same**
##### With input GovTrack #####
Name ips average deviation median 99th %
json 67.76 14.76 ms ±27.18% 15.60 ms 23.38 ms
jiffy 67.02 14.92 ms ±14.15% 13.36 ms 17.98 ms
Jason 31.96 31.29 ms ±21.89% 31.21 ms 43.31 ms
jsone 15.10 66.21 ms ±3.47% 65.92 ms 80.91 ms
Comparison:
json 67.76
jiffy 67.02 - 1.01x slower +0.163 ms
Jason 31.96 - 2.12x slower +16.53 ms
jsone 15.10 - 4.49x slower +51.45 ms
Memory usage statistics:
Name Memory usage
json 19.95 MB
jiffy 3.31 MB - 0.17x memory usage -16.63895 MB
Jason 18.90 MB - 0.95x memory usage -1.04369 MB
jsone 45.34 MB - 2.27x memory usage +25.39 MB
**All measurements for memory usage were the same**
##### With input Issue 90 #####
Name ips average deviation median 99th %
json 138.19 7.24 ms ±4.00% 7.29 ms 7.76 ms
Jason 61.99 16.13 ms ±3.08% 16.14 ms 17.02 ms
jsone 40.95 24.42 ms ±1.40% 24.37 ms 25.77 ms
jiffy 38.33 26.09 ms ±1.16% 26.00 ms 27.26 ms
Comparison:
json 138.19
Jason 61.99 - 2.23x slower +8.90 ms
jsone 40.95 - 3.37x slower +17.18 ms
jiffy 38.33 - 3.61x slower +18.86 ms
Memory usage statistics:
Name Memory usage
json 837.99 KB
Jason 832.97 KB - 0.99x memory usage -5.02344 KB
jsone 2705.60 KB - 3.23x memory usage +1867.61 KB
jiffy 12.80 KB - 0.02x memory usage -825.19531 KB
**All measurements for memory usage were the same**
##### With input JSON Generator #####
Name ips average deviation median 99th %
json 2.21 K 453.32 μs ±25.97% 413.03 μs 734.16 μs
jiffy 1.95 K 513.55 μs ±11.18% 482.70 μs 655.52 μs
Jason 1.64 K 609.09 μs ±24.69% 618.04 μs 1162.82 μs
jsone 0.77 K 1306.73 μs ±10.42% 1295.47 μs 1626.15 μs
Comparison:
json 2.21 K
jiffy 1.95 K - 1.13x slower +60.23 μs
Jason 1.64 K - 1.34x slower +155.76 μs
jsone 0.77 K - 2.88x slower +853.41 μs
Memory usage statistics:
Name Memory usage
json 785.81 KB
jiffy 109.13 KB - 0.14x memory usage -676.67969 KB
Jason 778.17 KB - 0.99x memory usage -7.64063 KB
jsone 1713.56 KB - 2.18x memory usage +927.75 KB
**All measurements for memory usage were the same**
##### With input Pokedex #####
Name ips average deviation median 99th %
json 4.59 K 217.75 μs ±4.04% 216.21 μs 237.48 μs
jiffy 3.30 K 302.81 μs ±6.42% 304.37 μs 359.16 μs
Jason 2.99 K 334.77 μs ±27.17% 301.33 μs 671.67 μs
jsone 1.51 K 662.13 μs ±12.25% 624.17 μs 899.83 μs
Comparison:
json 4.59 K
jiffy 3.30 K - 1.39x slower +85.06 μs
Jason 2.99 K - 1.54x slower +117.02 μs
jsone 1.51 K - 3.04x slower +444.38 μs
Memory usage statistics:
Name Memory usage
json 667.98 KB
jiffy 51.98 KB - 0.08x memory usage -616 KB
Jason 658.96 KB - 0.99x memory usage -9.02344 KB
jsone 1490.20 KB - 2.23x memory usage +822.21 KB
**All measurements for memory usage were the same**
##### With input UTF-8 unescaped #####
Name ips average deviation median 99th %
jiffy 19.41 K 51.51 μs ±8.97% 50.25 μs 63.58 μs
json 18.11 K 55.22 μs ±5.52% 54.96 μs 62.37 μs
Jason 11.69 K 85.57 μs ±6.13% 85.08 μs 98.33 μs
jsone 8.36 K 119.68 μs ±13.92% 116.16 μs 210.66 μs
Comparison:
jiffy 19.41 K
json 18.11 K - 1.07x slower +3.71 μs
Jason 11.69 K - 1.66x slower +34.06 μs
jsone 8.36 K - 2.32x slower +68.18 μs
Memory usage statistics:
Name Memory usage
jiffy 0.78 KB
json 5.98 KB - 7.65x memory usage +5.20 KB
Jason 6.02 KB - 7.71x memory usage +5.24 KB
jsone 207.48 KB - 265.57x memory usage +206.70 KB
**All measurements for memory usage were the same**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment