Skip to content

Instantly share code, notes, and snippets.

@tonsky
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonsky/9da339f87113e1f1a395 to your computer and use it in GitHub Desktop.
Save tonsky/9da339f87113e1f1a395 to your computer and use it in GitHub Desktop.
DataScript 0.11.4 perftests (clj/cljs comparison)

CLJ/CLJS perf comparison on DataScript 0.11.4

CLJ

test: q, method: d/q1, size: 100
{:unit μs, :min 61.923, :median 76.887, :max 161.738}

test: q, method: d/q2, size: 100
{:unit μs, :min 200.32, :median 213.523, :max 251.318}

test: q, method: d/q3, size: 100
{:unit μs, :min 298.005, :median 310.58, :max 340.592}

test: q, method: d/q4, size: 100
{:unit μs, :min 464.501, :median 478.489, :max 510.453}

test: q, method: d/q1, size: 500
{:unit μs, :min 139.551, :median 195.088, :max 202.672}

test: q, method: d/q2, size: 500
{:unit μs, :min 711.948, :median 753.765, :max 780.811}

test: q, method: d/q3, size: 500
{:unit μs, :min 1123.456, :median 1150.401, :max 1169.392}

test: q, method: d/q4, size: 500
{:unit μs, :min 1776.595, :median 1846.863, :max 1869.402}

test: q, method: d/q1, size: 2000
{:unit μs, :min 569.073, :median 655.533, :max 730.656}

test: q, method: d/q2, size: 2000
{:unit μs, :min 2780.555, :median 2835.694, :max 2921.282}

test: q, method: d/q3, size: 2000
{:unit μs, :min 3948.818, :median 4110.655, :max 4409.691}

test: q, method: d/q4, size: 2000
{:unit μs, :min 6642.384, :median 6863.013, :max 7500.0}

test: q, method: d/q1, size: 20000
{:unit μs, :min 5710.227, :median 6341.772, :max 6382.165}

test: q, method: d/q2, size: 20000
{:unit μs, :min 31060.606, :median 33000.0, :max 33900.0}

test: q, method: d/q3, size: 20000
{:unit μs, :min 44478.26, :median 47136.363, :max 48380.952}

test: q, method: d/q4, size: 20000
{:unit μs, :min 74571.428, :median 78461.538, :max 81769.23}

CLJS

test: q, method: d/q1, size: 100
{:unit μs, :min 214.271, :median 241.439, :max 354.652}

test: q, method: d/q2, size: 100
{:unit μs, :min 460.197, :median 495.772, :max 510.908}

test: q, method: d/q3, size: 100
{:unit μs, :min 556.24, :median 647.827, :max 661.472}

test: q, method: d/q4, size: 100
{:unit μs, :min 803.795, :median 882.808, :max 914.635}

test: q, method: d/q1, size: 500
{:unit μs, :min 446.059, :median 471.545, :max 475.829}

test: q, method: d/q2, size: 500
{:unit μs, :min 744.158, :median 787.283, :max 833.897}

test: q, method: d/q3, size: 500
{:unit μs, :min 1018.816, :median 1102.546, :max 1187.971}

test: q, method: d/q4, size: 500
{:unit μs, :min 1432.499, :median 1503.977, :max 1585.721}

test: q, method: d/q1, size: 2000
{:unit μs, :min 1342.115, :median 1395.461, :max 1499.656}

test: q, method: d/q2, size: 2000
{:unit μs, :min 1898.836, :median 2123.617, :max 2167.653}

test: q, method: d/q3, size: 2000
{:unit μs, :min 2788.785, :median 2863.814, :max 2979.562}

test: q, method: d/q4, size: 2000
{:unit μs, :min 4150.132, :median 4318.426, :max 4645.8}

test: q, method: d/q1, size: 20000
{:unit μs, :min 11578.643, :median 11874.199, :max 12320.28}

test: q, method: d/q2, size: 20000
{:unit μs, :min 16672.573, :median 17011.999, :max 17569.894}

test: q, method: d/q3, size: 20000
{:unit μs, :min 22328.488, :median 23018.068, :max 23955.19}

test: q, method: d/q4, size: 20000
{:unit μs, :min 33369.903, :median 33986.866, :max 35982.392}

datascript.test.perf/perftest-transact

CLJ

test: transact, size: 100, batch: 1
{:unit μs, :min 6965.181, :median 7096.453, :max 7977.671}

test: transact, size: 500, batch: 1
{:unit μs, :min 39669.291, :median 40016.0, :max 40548.387}

test: transact, size: 2000, batch: 1
{:unit μs, :min 178206.896, :median 179000.0, :max 183857.142}

CLJS

test: transact, size: 100, batch: 1
{:unit μs, :min 28409.289, :median 29317.187, :max 29804.851}

test: transact, size: 500, batch: 1
{:unit μs, :min 150202.911, :median 154573.424, :max 156729.687}

test: transact, size: 2000, batch: 1
{:unit μs, :min 619820.888, :median 622108.444, :max 642528.374}

datascript.test.perf/perftest-from-reader

CLJ

fn: new, size: 100
{:unit μs, :min 1784.516, :median 1841.988, :max 1882.574}

fn: new, size: 500
{:unit μs, :min 12200.0, :median 12272.058, :max 12426.799}

fn: new, size: 2000
{:unit μs, :min 60301.204, :median 61524.39, :max 61731.707}

fn: new, size: 5000
{:unit μs, :min 170866.666, :median 173827.586, :max 177413.793}

fn: new, size: 20000
{:unit μs, :min 817714.285, :median 824000.0, :max 841833.333}

CLJS

fn: new, size: 100
{:unit μs, :min 953.384, :median 967.344, :max 1007.807}

fn: new, size: 500
{:unit μs, :min 5353.745, :median 5389.432, :max 5886.928}

fn: new, size: 2000
{:unit μs, :min 24241.338, :median 24760.143, :max 25335.242}

fn: new, size: 5000
{:unit μs, :min 67755.797, :median 68372.121, :max 68857.082}

fn: new, size: 20000
{:unit μs, :min 320199.499, :median 328900.312, :max 338242.466}

datascript.test.perf/perftest_rules

CLJ

form: [:wide 3 3]
{:unit μs, :min 887.411, :median 921.731, :max 2693.548}

form: [:wide 5 3]
{:unit μs, :min 3626.811, :median 3795.454, :max 4008.0}

form: [:wide 7 3]
{:unit μs, :min 28800.0, :median 29342.857, :max 30575.757}

form: [:wide 4 6]
{:unit μs, :min 4975.247, :median 5148.717, :max 5207.253}

form: [:long 10 3]
{:unit μs, :min 5324.468, :median 5381.72, :max 5640.449}

form: [:long 5 5]
{:unit μs, :min 2014.056, :median 2083.16, :max 2105.042}

form: [:long 30 3]
{:unit μs, :min 60705.882, :median 61411.764, :max 62117.647}

form: [:long 30 5]
{:unit μs, :min 86083.333, :median 88250.0, :max 91454.545}

CLJS

form: [:wide 3 3]
{:unit μs, :min 4524.986, :median 4722.629, :max 6996.097}

form: [:wide 5 3]
{:unit μs, :min 11869.376, :median 11966.404, :max 12684.987}

form: [:wide 7 3]
{:unit μs, :min 56663.777, :median 60326.411, :max 67375.866}

form: [:wide 4 6]
{:unit μs, :min 13589.716, :median 13793.315, :max 15237.818}

form: [:long 10 3]
{:unit μs, :min 26679.342, :median 28834.4, :max 29935.647}

form: [:long 5 5]
{:unit μs, :min 9468.245, :median 9653.769, :max 10822.645}

form: [:long 30 3]
{:unit μs, :min 279549.25, :median 282990.75, :max 318583.499}

form: [:long 30 5]
{:unit μs, :min 366200, :median 376400.666, :max 393506.999}

datascript.test.perf/perftest_db_hash

CLJ

{:unit μs, :min 314.088, :median 322.175, :max 400.079}

CLJS

{:unit μs, :min 35.618, :median 35.896, :max 38.183}

datascript.test.perf/perftest-db-equiv

CLJ

{:unit μs, :min 502.006, :median 508.121, :max 620.198}

CLJS

{:unit μs, :min 116.292, :median 117.127, :max 118.113}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment