Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

case switch support #158

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

case switch support #158

wants to merge 20 commits into from

Conversation

jianlingzhong
Copy link
Contributor

@jianlingzhong jianlingzhong commented Jan 5, 2025

case benchmark: Jank v.s. clj.

Integer

Benchmark Details
JANK Benchmark Script
(require 'jank.perf)
(jank.perf/benchmark
  (case 0 0 :zero
    1       :one
    2       :two
    :default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,651,267.30 |    0.2% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,066,836.64 |    0.2% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      759,793,617.93 |    2.7% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.31 |      761,151,105.76 |    0.5% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.30 |      772,041,451.42 |    1.7% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,343,416.97 |    0.3% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,751,455.12 |    0.4% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,634,255.53 |    0.3% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,157,490.65 |    0.2% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,004,450.10 |    0.3% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      778,098,919.10 |    0.3% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,301,852.82 |    0.3% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,358,033.27 |    0.2% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,567,324.80 |    0.3% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,791,719.63 |    0.4% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,551,787.89 |    0.4% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,280,808.82 |    0.2% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,352,158.86 |    0.2% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,365,355.09 |    0.2% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,200,760.49 |    0.1% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,831,747.66 |    0.0% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     782,343,416.97 |      0.3% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case 0 0 :zero
1       :one
2       :two
:default))
Running Clj Benchmark
Evaluation count : 91873332 in 6 samples of 15312222 calls.
             Execution time mean : 1.244136 ns
    Execution time std-deviation : 0.008598 ns
   Execution time lower quantile : 1.235858 ns ( 2.5%)
   Execution time upper quantile : 1.254407 ns (97.5%)
                   Overhead used : 5.288734 ns

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 1.244 1.0x

Conclusion:
Clojure and Jank are comparable (0.036 ns/op difference)

Real

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case 3.14 3.14 :pi
2.71          :e
1.61          :phi
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,994,524.30 |    0.5% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,250,478.01 |    0.2% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,234,437.63 |    0.3% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,772,892.75 |    0.0% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.41 |      707,679,018.74 |    0.8% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,872,186.17 |    0.2% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,140,162.46 |    0.2% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,351,040.53 |    0.5% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      774,150,276.24 |    0.8% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,318,979.18 |    0.2% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,387,892.19 |    0.2% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,501,326.42 |    0.1% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,476,329.24 |    0.3% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,778,764.58 |    0.3% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,488,432.56 |    0.2% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,662,537.43 |    0.3% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,663,519.74 |    0.3% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,688,210.67 |    0.1% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,340,828.09 |    0.2% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,159,420.29 |    0.3% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,125,896.61 |    0.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     782,476,329.24 |      0.2% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case 3.14 3.14 :pi
2.71          :e
1.61          :phi
:default))
Running Clj Benchmark
Evaluation count : 21758040 in 6 samples of 3626340 calls.
             Execution time mean : 22.310683 ns
    Execution time std-deviation : 0.116541 ns
   Execution time lower quantile : 22.218434 ns ( 2.5%)
   Execution time upper quantile : 22.496195 ns (97.5%)
                   Overhead used : 5.288789 ns

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 22.311 17.4x

Conclusion:
Jank is 17.4x faster (21.031 ns/op difference)

String

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case "AaAaAaAa" "AaAaAaAa" :hasha
"BBBBBBBB"                :hashb
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,806,974.58 |    0.4% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,126,448.70 |    0.5% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,350,531.20 |    0.2% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,647,707.98 |    0.6% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      774,412,121.67 |    1.3% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,612,609.39 |    0.6% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,265,107.56 |    0.4% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,008,794.18 |    0.4% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      784,186,347.02 |    0.1% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,722,908.97 |    0.6% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      776,749,348.24 |    0.8% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,853,161.11 |    0.1% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,132,438.36 |    0.2% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,421,629.02 |    0.2% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,328,754.62 |    0.2% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,743,779.42 |    0.3% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,331,111.32 |    0.2% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,314,525.35 |    0.2% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,151,358.85 |    0.3% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,494,694.45 |    0.2% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.34 |      745,239,727.94 |    4.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     782,151,358.85 |      0.3% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case "AaAaAaAa" "AaAaAaAa" :hasha
"BBBBBBBB"                :hashb
:default))
Running Clj Benchmark
Evaluation count : 53473656 in 6 samples of 8912276 calls.
             Execution time mean : 5.912942 ns
    Execution time std-deviation : 0.021991 ns
   Execution time lower quantile : 5.897064 ns ( 2.5%)
   Execution time upper quantile : 5.948838 ns (97.5%)
                   Overhead used : 5.287125 ns

Found 1 outliers in 6 samples (16.6667 %)
	low-severe	 1 (16.6667 %)
 Variance from outliers : 13.8889 % Variance is moderately inflated by outliers

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 5.913 4.6x

Conclusion:
Jank is 4.6x faster (4.633 ns/op difference)

Ratio

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case 3/4
4/3 :four-thirds
3/4 :three-fourths
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.30 |      768,698,132.14 |    0.5% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,255,348.75 |    0.5% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.33 |      751,188,159.44 |    2.4% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      776,348,174.09 |    1.0% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,825,615.05 |    0.5% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,605,123.13 |    0.2% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,786,557.91 |    0.1% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.36 |      733,426,851.61 |    3.5% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      758,256,346.52 |    1.8% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.30 |      768,050,035.24 |    1.6% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,239,874.20 |    0.2% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,972,155.62 |    0.0% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,427,366.88 |    0.4% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,291,636.00 |    0.4% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,637,689.08 |    0.2% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,164,601.77 |    0.2% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,474,079.50 |    0.1% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,345,983.45 |    0.2% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,346,546.48 |    0.2% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,247,981.76 |    0.3% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,563,116.71 |    0.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     781,427,366.88 |      0.3% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case 3/4
4/3 :four-thirds
3/4 :three-fourths
:default))
Running Clj Benchmark
Evaluation count : 9151878 in 6 samples of 1525313 calls.
             Execution time mean : 58.841866 ns
    Execution time std-deviation : 0.078595 ns
   Execution time lower quantile : 58.740776 ns ( 2.5%)
   Execution time upper quantile : 58.925280 ns (97.5%)
                   Overhead used : 6.844588 ns

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 58.842 46.0x

Conclusion:
Jank is 46.0x faster (57.562 ns/op difference)

Symbol

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case 'symbol symbol :symbol-match
other              :symbol-no-match
:symbol-fallback))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,485,720.96 |    0.0% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,335,060.15 |    0.2% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.37 |      729,195,355.20 |    2.4% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,728,688.66 |    0.5% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,380,866.38 |    0.4% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,825,519.93 |    0.8% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      757,342,008.95 |    1.6% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      774,781,508.74 |    1.3% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,682,645.45 |    0.7% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,734,798.74 |    0.2% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.31 |      761,002,525.86 |    0.0% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      756,460,466.40 |    0.6% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,383,426.47 |    0.3% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,862,253.23 |    0.3% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,286,016.57 |    0.2% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,213,630.14 |    0.2% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,473,639.78 |    0.2% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,431,354.43 |    0.2% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,451,690.10 |    0.2% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,369,631.63 |    0.2% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,237,562.88 |    0.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     782,383,426.47 |      0.2% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case 'symbol symbol :symbol-match
other              :symbol-no-match
:symbol-fallback))
Running Clj Benchmark
Evaluation count : 24114492 in 6 samples of 4019082 calls.
             Execution time mean : 19.588495 ns
    Execution time std-deviation : 0.020664 ns
   Execution time lower quantile : 19.568794 ns ( 2.5%)
   Execution time upper quantile : 19.621133 ns (97.5%)
                   Overhead used : 5.291765 ns

Found 1 outliers in 6 samples (16.6667 %)
	low-severe	 1 (16.6667 %)
 Variance from outliers : 13.8889 % Variance is moderately inflated by outliers

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 19.588 15.3x

Conclusion:
Jank is 15.3x faster (18.308 ns/op difference)

Keywords

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case :foo
:foo    :bar
:baz    :quux
:none))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.30 |      770,226,479.04 |    0.3% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,534,163.58 |    0.2% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.31 |      761,480,303.13 |    3.0% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,436,487.62 |    0.3% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,131,104.00 |    0.2% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,107,387.66 |    0.2% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,057,291.08 |    0.2% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,440,841.02 |    0.4% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,319,415.18 |    0.1% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,090,795.71 |    0.2% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,462,845.63 |    0.4% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,546,432.47 |    0.2% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,821,054.64 |    0.4% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      778,004,054.05 |    0.4% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,225,917.96 |    0.2% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,296,598.64 |    0.2% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.35 |      740,635,630.48 |    0.5% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,164,601.77 |    0.2% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,200,760.49 |    0.2% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      776,117,500.45 |    0.3% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,466,138.05 |    0.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     783,057,291.08 |      0.2% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case :foo
:foo    :bar
:baz    :quux
:none))
Running Clj Benchmark
Evaluation count : 71498226 in 6 samples of 11916371 calls.
             Execution time mean : 1.873067 ns
    Execution time std-deviation : 0.021331 ns
   Execution time lower quantile : 1.853832 ns ( 2.5%)
   Execution time upper quantile : 1.896615 ns (97.5%)
                   Overhead used : 6.540142 ns

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 1.873 1.5x

Conclusion:
Jank is 1.5x faster (0.593 ns/op difference)

Map

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case {:a 1 :b 2}
{:a 1 :b 2} :map-match
{:a 3 :b 4} :not-matched
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.31 |      761,515,949.84 |    2.8% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.54 |      649,344,156.19 |    2.1% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      775,074,699.61 |    1.3% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,175,387.95 |    0.4% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      775,971,317.64 |    1.1% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,039,378.75 |    0.4% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,520,169.85 |    0.3% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      784,075,431.31 |    0.1% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,711,029.77 |    0.0% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.30 |      767,758,073.55 |    1.0% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.31 |      760,805,669.17 |    0.8% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,826,132.77 |    0.0% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,851,036.16 |    0.0% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,621,873.83 |    0.5% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,609,994.93 |    0.5% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,577,560.78 |    0.5% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,383,525.90 |    0.2% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,862,626.99 |    0.1% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,424,468.33 |    0.2% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,380,177.04 |    0.1% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,830,024.25 |    0.0% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     781,175,387.95 |      0.4% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case {:a 1 :b 2}
{:a 1 :b 2} :map-match
{:a 3 :b 4} :not-matched
:default))
Running Clj Benchmark
Evaluation count : 6163782 in 6 samples of 1027297 calls.
             Execution time mean : 89.917042 ns
    Execution time std-deviation : 0.123872 ns
   Execution time lower quantile : 89.828419 ns ( 2.5%)
   Execution time upper quantile : 90.077769 ns (97.5%)
                   Overhead used : 6.541635 ns

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 89.917 70.2x

Conclusion:
Jank is 70.2x faster (88.637 ns/op difference)

Set

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case #{1 2}
#{1 2}  :set-match
#{3 2}  :vector-match
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.36 |      737,377,540.92 |    0.5% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,303,622.23 |    0.7% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,298,768.58 |    0.3% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.37 |      728,010,970.97 |    1.3% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,332,741.87 |    0.7% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,363,344.87 |    0.8% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,904,943.69 |    0.3% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      776,544,577.57 |    1.1% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,975,613.15 |    0.2% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,199,763.64 |    0.3% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,239,874.20 |    0.2% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.33 |      750,929,095.35 |    2.8% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      773,218,176.69 |    1.1% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      772,254,200.18 |    0.6% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      776,151,403.25 |    0.5% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,550,114.77 |    0.2% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,165,916.62 |    0.3% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,568,283.20 |    0.0% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,850,481.59 |    0.0% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,359,000.31 |    0.2% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,182,174.55 |    0.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     779,303,622.23 |      0.3% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case #{1 2}
#{1 2}  :set-match
#{3 2}  :vector-match
:default))
Running Clj Benchmark
Evaluation count : 5703756 in 6 samples of 950626 calls.
             Execution time mean : 99.428288 ns
    Execution time std-deviation : 1.291268 ns
   Execution time lower quantile : 98.431166 ns ( 2.5%)
   Execution time upper quantile : 101.362887 ns (97.5%)
                   Overhead used : 6.536859 ns

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 99.428 77.7x

Conclusion:
Jank is 77.7x faster (98.148 ns/op difference)

Vector

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case [:key1 :key2]
[:key1 :key2] :matched
:key          :not-matched
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      758,854,302.75 |    0.7% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      776,402,124.80 |    1.0% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.33 |      754,644,067.89 |    2.5% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.33 |      750,269,327.89 |    2.6% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.34 |      744,574,614.93 |    1.7% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,667,407.61 |    0.8% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,429,835.01 |    0.2% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,200,161.52 |    0.2% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,903,982.39 |    0.4% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,227,697.14 |    0.8% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,224,912.89 |    0.3% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,387,176.22 |    0.1% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,465,832.63 |    0.4% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,189,716.62 |    0.2% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.31 |      762,290,376.29 |    2.6% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,055,418.17 |    0.4% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,476,069.98 |    0.2% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,586,414.78 |    0.2% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,316,743.10 |    0.7% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.33 |      753,440,863.73 |    0.6% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,369,631.63 |    0.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     779,224,912.89 |      0.4% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case [:key1 :key2]
[:key1 :key2] :matched
:key          :not-matched
:default))
Running Clj Benchmark
Evaluation count : 11623944 in 6 samples of 1937324 calls.
             Execution time mean : 46.353103 ns
    Execution time std-deviation : 0.050168 ns
   Execution time lower quantile : 46.307693 ns ( 2.5%)
   Execution time upper quantile : 46.430837 ns (97.5%)
                   Overhead used : 5.288391 ns

Found 1 outliers in 6 samples (16.6667 %)
	low-severe	 1 (16.6667 %)
 Variance from outliers : 13.8889 % Variance is moderately inflated by outliers

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 46.353 36.2x

Conclusion:
Jank is 36.2x faster (45.073 ns/op difference)

Mixed int and real

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case 3.4
3.4   :three-point-four
2     :two
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.33 |      750,465,196.35 |    2.6% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,065,544.54 |    0.2% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,314,525.35 |    0.2% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      784,266,280.71 |    0.1% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,105,045.75 |    0.5% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      778,012,916.75 |    0.9% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.30 |      770,035,348.03 |    1.5% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      775,418,964.36 |    0.6% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      778,208,503.77 |    0.4% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      778,244,731.79 |    0.6% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      778,164,800.27 |    0.6% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,281,582.80 |    0.1% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,098,683.55 |    0.4% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      756,582,903.08 |    0.3% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,328,183.80 |    0.2% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,452,223.16 |    0.2% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,532,061.97 |    0.4% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.34 |      743,652,749.93 |    4.2% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,538,798.92 |    0.3% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,144,869.55 |    0.3% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,539,632.53 |    0.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     779,144,869.55 |      0.4% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case 3.4
3.4   :three-point-four
2     :two
:default))
Running Clj Benchmark
Evaluation count : 20853468 in 6 samples of 3475578 calls.
             Execution time mean : 23.490847 ns
    Execution time std-deviation : 0.142019 ns
   Execution time lower quantile : 23.301730 ns ( 2.5%)
   Execution time upper quantile : 23.655167 ns (97.5%)
                   Overhead used : 5.293418 ns

Found 2 outliers in 6 samples (33.3333 %)
	low-severe	 1 (16.6667 %)
	low-mild	 1 (16.6667 %)
 Variance from outliers : 13.8889 % Variance is moderately inflated by outliers

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 23.491 18.4x

Conclusion:
Jank is 18.4x faster (22.211 ns/op difference)

Mixed int and string

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case 1
1   :one
2   :two
"3" :three
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,856,532.41 |    0.2% |      0.02 | `nil`
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.37 |      728,394,188.25 |    2.0% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.35 |      742,839,809.42 |    2.4% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      776,007,333.09 |    0.6% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      775,091,482.65 |    0.5% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,437,821.66 |    0.2% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,131,908.70 |    0.8% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,876,927.32 |    0.2% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,954,988.24 |    0.4% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      779,750,133.79 |    0.3% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.33 |      751,138,606.84 |    1.6% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,363,052.78 |    0.3% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,635,552.25 |    0.4% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.27 |      784,495,530.01 |    0.1% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.34 |      744,258,720.93 |    5.3% |      0.02 | :wavy_dash: `nil` (Unstable with ~1,100,339.0 iters. Increase `minEpochIterations` to e.g. 11003390)
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      778,056,755.31 |    0.8% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,994,894.70 |    0.1% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.31 |      764,943,607.26 |    1.5% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      757,960,958.46 |    0.4% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.30 |      767,687,912.87 |    1.9% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,654,254.33 |    0.3% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.29 |     777,363,052.78 |      0.4% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case 1
1   :one
2   :two
"3" :three
:default))
Running Clj Benchmark
Evaluation count : 50778144 in 6 samples of 8463024 calls.
             Execution time mean : 6.549327 ns
    Execution time std-deviation : 0.056690 ns
   Execution time lower quantile : 6.510964 ns ( 2.5%)
   Execution time upper quantile : 6.618940 ns (97.5%)
                   Overhead used : 5.297379 ns

Performance Summary

System Time/op (ns) Relative
Jank 1.290 1.0x
Clojure 6.549 5.1x

Conclusion:
Jank is 5.1x faster (5.259 ns/op difference)

Multivalues

Benchmark Details
JANK Benchmark Script
    (require 'jank.perf)
    (jank.perf/benchmark (case 2
(0 1) :zero-or-one
(2 3) :two-or-three
:default))
Running Jank Benchmark (21 times)
Individual Jank Run Outputs
Jank Run 1 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.43 |      698,219,700.34 |    5.7% |      0.02 | :wavy_dash: `nil` (Unstable with ~1,100,339.0 iters. Increase `minEpochIterations` to e.g. 11003390)
nil
Jank Run 2 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,108,153.10 |    1.0% |      0.02 | `nil`
nil
Jank Run 3 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,125,297.75 |    0.0% |      0.02 | `nil`
nil
Jank Run 4 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.36 |      736,921,545.40 |    0.4% |      0.02 | `nil`
nil
Jank Run 5 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,210,566.25 |    0.5% |      0.02 | `nil`
nil
Jank Run 6 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      776,916,269.86 |    0.6% |      0.02 | `nil`
nil
Jank Run 7 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,661,304.56 |    0.8% |      0.02 | `nil`
nil
Jank Run 8 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,104,772.16 |    0.4% |      0.02 | `nil`
nil
Jank Run 9 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.31 |      762,676,713.90 |    1.7% |      0.02 | `nil`
nil
Jank Run 10 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,098,963.34 |    0.6% |      0.02 | `nil`
nil
Jank Run 11 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      759,738,001.81 |    0.6% |      0.02 | `nil`
nil
Jank Run 12 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      756,009,906.58 |    0.3% |      0.02 | `nil`
nil
Jank Run 13 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,128,878.28 |    0.2% |      0.02 | `nil`
nil
Jank Run 14 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      780,818,251.16 |    0.3% |      0.02 | `nil`
nil
Jank Run 15 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.32 |      756,214,729.28 |    1.9% |      0.02 | `nil`
nil
Jank Run 16 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,802,146.84 |    0.4% |      0.02 | `nil`
nil
Jank Run 17 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,654,692.58 |    0.2% |      0.02 | `nil`
nil
Jank Run 18 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      781,855,750.19 |    0.3% |      0.02 | `nil`
nil
Jank Run 19 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.29 |      777,029,982.14 |    0.1% |      0.02 | `nil`
nil
Jank Run 20 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      782,948,203.81 |    0.3% |      0.02 | `nil`
nil
Jank Run 21 Output
Bottom of clojure.core

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.28 |      783,250,478.01 |    0.2% |      0.02 | `nil`
nil
|           ns/op |               op/s |     err% |      total | benchmark
|-----------------|--------------------|----------|------------|:----------
|            1.28 |     780,098,963.34 |      0.4% |       0.02 | `nil`
CLJ Benchmark Script
    (use '[leiningen.exec :only (deps)])
    (deps '[[criterium "0.4.4"]])
    (require '[criterium.core :refer [quick-bench]])
    (quick-bench (case 2
(0 1) :zero-or-one
(2 3) :two-or-three
:default))
Running Clj Benchmark
Evaluation count : 80266470 in 6 samples of 13377745 calls.
             Execution time mean : 2.191966 ns
    Execution time std-deviation : 0.031630 ns
   Execution time lower quantile : 2.160373 ns ( 2.5%)
   Execution time upper quantile : 2.234075 ns (97.5%)
                   Overhead used : 5.298143 ns

Performance Summary

System Time/op (ns) Relative
Jank 1.280 1.0x
Clojure 2.192 1.7x

Conclusion:
Jank is 1.7x faster (0.912 ns/op difference)

closes #143

@jianlingzhong jianlingzhong force-pushed the case branch 3 times, most recently from 6d1c17a to c777dbd Compare January 5, 2025 02:27
@jianlingzhong jianlingzhong force-pushed the case branch 5 times, most recently from d4164bd to ed0b311 Compare January 28, 2025 03:07
@jianlingzhong jianlingzhong force-pushed the case branch 3 times, most recently from fbe4e89 to c4afc9c Compare February 6, 2025 07:40
@jianlingzhong jianlingzhong requested a review from jeaye February 10, 2025 05:39
Copy link
Contributor

@frenchy64 frenchy64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I left some initial thoughts before digging into details.

Copy link
Member

@jeaye jeaye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, Jianling. This is an impressive feature. 💪

Aside from the C++ comments, I stopped leaving comments in the .jank files because there's just too much going on. Mainly, there's a lot of overlap and duplication.

  1. Each test file should have one focus and test one thing (i.e. no tests with 10 different test cases)
  2. There should be very minimal overlap between the tests
  3. For categorically different tests, we should put them into subdirectories
  4. We need to include tests which intentionally try to break the feature

So, for case, we need to identify the primary feature set. Here's a starting point:

  1. Input shapes (make sure I didn't miss any)
    1. Integers
    2. Reals
    3. Ratios
    4. Bools
    5. Keywords
    6. Characters
    7. Multiple values
    8. Collections
  2. Scenario
    1. Empty case (no branches, no default)
    2. Empty case with default
    3. Normal cases
    4. Normal cases with default value
    5. Nested
  3. Positions
    1. Value
    2. Statement
    3. Return
  4. Expected failures
    1. Non-literal branch value
    2. Duplicate branches
    3. Overlapping branches
  5. Unexpected failures
    1. Invalid data passed to case* (this one may have a few files)

Each one of these gets one file, with one test case in it. We don't need more than that. The groupings I've done there can also correspond with the directories, if that guidance helps. I would recommend taking a look at the other tests we have and how they're laid out. For example, the fn tests:

❯ tree test/jank/form/fn/
test/jank/form/fn/
├── arity
│   ├── fail-duplicate.jank
│   ├── fail-invalid-arity-wrapper-type.jank
│   ├── pass-immediate-call.jank
│   ├── pass-multiple.jank
│   ├── pass-single-wrapped.jank
│   └── variadic
│       ├── fail-multiple-adjacent-ampersands.jank
│       ├── fail-multiple-variadic-arities.jank
│       ├── fail-nothing-after-ampersand.jank
│       ├── fail-packing-exceeds-max-params-but-not-variadic.jank
│       ├── fail-param-after-rest.jank
│       ├── fail-same-position-as-fixed.jank
│       ├── pass-ambiguous.jank
│       ├── pass-dynamic.jank
│       ├── pass-packing-exceeds-max-params.jank
│       ├── pass-position-0.jank
│       └── pass-with-fixed-arities.jank
├── closure
│   ├── pass-multiple-arities-using-captures.jank
│   ├── pass-nested-fn.jank
│   └── pass-nested-fn-skip-level.jank
├── fail-just-fn.jank
├── fail-missing-params.jank
├── fail-named-not-symbol.jank
├── fail-not-all-params-symbols.jank
├── fail-qualified-param.jank
├── fail-too-many-names.jank
├── fail-too-many-params.jank
├── named-recur
│   ├── pass-practical.jank
│   ├── pass-recur-across-fn.jank
│   ├── pass-recur-from-closure.jank
│   └── pass-same-name-param.jank
├── pass-empty.jank
├── pass-named.jank
├── pass-params-with-same-name.jank
└── recur
    ├── fail-invalid-arity-fixed.jank
    ├── fail-invalid-arity-variadic.jank
    ├── fail-not-fail-in-if-do.jank
    ├── fail-not-tail-in-body.jank
    ├── fail-outside-of-fn-nullary.jank
    ├── fail-outside-of-fn-unary.jank
    ├── fail-recur-within-recur.jank
    ├── pass-countdown.jank
    ├── pass-in-if-do.jank
    ├── pass-variadic-position-0.jank
    └── pass-variadic-position-1.jank

compiler+runtime/include/cpp/jank/analyze/expr/case.hpp Outdated Show resolved Hide resolved
compiler+runtime/include/cpp/jank/analyze/processor.hpp Outdated Show resolved Hide resolved
compiler+runtime/include/cpp/jank/analyze/processor.hpp Outdated Show resolved Hide resolved
compiler+runtime/include/cpp/jank/analyze/processor.hpp Outdated Show resolved Hide resolved
compiler+runtime/src/cpp/jank/analyze/processor.cpp Outdated Show resolved Hide resolved
compiler+runtime/test/jank/form/case/pass-case-ratio.jank Outdated Show resolved Hide resolved
@jianlingzhong
Copy link
Contributor Author

Great work, Jianling. This is an impressive feature. 💪

Aside from the C++ comments, I stopped leaving comments in the .jank files because there's just too much going on. Mainly, there's a lot of overlap and duplication.

  1. Each test file should have one focus and test one thing (i.e. no tests with 10 different test cases)
  2. There should be very minimal overlap between the tests
  3. For categorically different tests, we should put them into subdirectories
  4. We need to include tests which intentionally try to break the feature

So, for case, we need to identify the primary feature set. Here's a starting point:

  1. Input shapes (make sure I didn't miss any)

    1. Integers
    2. Reals
    3. Ratios
    4. Bools
    5. Keywords
    6. Characters
    7. Multiple values
    8. Collections
  2. Scenario

    1. Empty case (no branches, no default)
    2. Empty case with default
    3. Normal cases
    4. Normal cases with default value
    5. Nested
  3. Positions

    1. Value
    2. Statement
    3. Return
  4. Expected failures

    1. Non-literal branch value
    2. Duplicate branches
    3. Overlapping branches
  5. Unexpected failures

    1. Invalid data passed to case* (this one may have a few files)

Each one of these gets one file, with one test case in it. We don't need more than that. The groupings I've done there can also correspond with the directories, if that guidance helps. I would recommend taking a look at the other tests we have and how they're laid out. For example, the fn tests:

❯ tree test/jank/form/fn/
test/jank/form/fn/
├── arity
│   ├── fail-duplicate.jank
│   ├── fail-invalid-arity-wrapper-type.jank
│   ├── pass-immediate-call.jank
│   ├── pass-multiple.jank
│   ├── pass-single-wrapped.jank
│   └── variadic
│       ├── fail-multiple-adjacent-ampersands.jank
│       ├── fail-multiple-variadic-arities.jank
│       ├── fail-nothing-after-ampersand.jank
│       ├── fail-packing-exceeds-max-params-but-not-variadic.jank
│       ├── fail-param-after-rest.jank
│       ├── fail-same-position-as-fixed.jank
│       ├── pass-ambiguous.jank
│       ├── pass-dynamic.jank
│       ├── pass-packing-exceeds-max-params.jank
│       ├── pass-position-0.jank
│       └── pass-with-fixed-arities.jank
├── closure
│   ├── pass-multiple-arities-using-captures.jank
│   ├── pass-nested-fn.jank
│   └── pass-nested-fn-skip-level.jank
├── fail-just-fn.jank
├── fail-missing-params.jank
├── fail-named-not-symbol.jank
├── fail-not-all-params-symbols.jank
├── fail-qualified-param.jank
├── fail-too-many-names.jank
├── fail-too-many-params.jank
├── named-recur
│   ├── pass-practical.jank
│   ├── pass-recur-across-fn.jank
│   ├── pass-recur-from-closure.jank
│   └── pass-same-name-param.jank
├── pass-empty.jank
├── pass-named.jank
├── pass-params-with-same-name.jank
└── recur
    ├── fail-invalid-arity-fixed.jank
    ├── fail-invalid-arity-variadic.jank
    ├── fail-not-fail-in-if-do.jank
    ├── fail-not-tail-in-body.jank
    ├── fail-outside-of-fn-nullary.jank
    ├── fail-outside-of-fn-unary.jank
    ├── fail-recur-within-recur.jank
    ├── pass-countdown.jank
    ├── pass-in-if-do.jank
    ├── pass-variadic-position-0.jank
    └── pass-variadic-position-1.jank

I've updated the test jank files.

Copy link
Member

@jeaye jeaye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woot! This is really coming together. I left some notes to improve the error messages and a couple other smaller things. I think, after those, we'll be ready. 🚀

compiler+runtime/src/cpp/jank/analyze/processor.cpp Outdated Show resolved Hide resolved
compiler+runtime/src/cpp/jank/analyze/processor.cpp Outdated Show resolved Hide resolved
compiler+runtime/src/cpp/jank/analyze/processor.cpp Outdated Show resolved Hide resolved
compiler+runtime/src/cpp/jank/error/analyze.cpp Outdated Show resolved Hide resolved
compiler+runtime/src/cpp/jank/codegen/llvm_processor.cpp Outdated Show resolved Hide resolved
compiler+runtime/src/cpp/jank/codegen/llvm_processor.cpp Outdated Show resolved Hide resolved
compiler+runtime/test/jank/form/case/pass-escape-char.jank Outdated Show resolved Hide resolved
compiler+runtime/test/jank/form/case/pass-keywards.jank Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement case*
3 participants