wota and nota surprisingly slow encoding for a single integer #10
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[aa1a8] [benchmarks/wota_nota_json.js:163:12: [script 2]: Benchmark: Wota vs Nota vs JSON
[aa1a8] [benchmarks/wota_nota_json.js:164:12: [script 2]: ================================
[aa1a8] [benchmarks/wota_nota_json.js:167:14: [script 2]: SCENARIO: Empty object
[aa1a8] [benchmarks/wota_nota_json.js:168:14: [script 2]: Data length: 4 | Iterations: 10000
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Wota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.042s => 956481.1 encodes/sec [4181.995900000001 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.020s => 2011035.6 decodes/sec [1989.0250000000003/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 32 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Nota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.040s => 998664.3 encodes/sec [4005.3500000000004 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.020s => 1958328.4 decodes/sec [2042.5582999999997/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 4 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: JSON:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.065s => 617280.4 encodes/sec [6480.037499999999 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.022s => 1827151.5 decodes/sec [2189.1999999999994/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 8 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:184:14: [script 2]: ---------------------------------------------------------
[aa1a8] [benchmarks/wota_nota_json.js:167:14: [script 2]: SCENARIO: Small Integers
[aa1a8] [benchmarks/wota_nota_json.js:168:14: [script 2]: Data length: 4 | Iterations: 100000
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Wota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.280s => 1428074.4 encodes/sec [2800.974580000001 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.178s => 2252479.5 decodes/sec [1775.8208400000008/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 32 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Nota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.302s => 1326219.5 encodes/sec [3016.092090000001 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.166s => 2412860.6 decodes/sec [1657.78333/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 7 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: JSON:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.406s => 984902.5 encodes/sec [4061.3158299999986 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.215s => 1860927.5 decodes/sec [2149.465829999999/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 9 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:184:14: [script 2]: ---------------------------------------------------------
[aa1a8] [benchmarks/wota_nota_json.js:167:14: [script 2]: SCENARIO: Floating point
[aa1a8] [benchmarks/wota_nota_json.js:168:14: [script 2]: Data length: 3 | Iterations: 100000
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Wota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.216s => 1388724.4 encodes/sec [2160.2558299999996 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.138s => 2174554.5 decodes/sec [1379.5929200000014/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 48 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Nota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.407s => 737440.8 encodes/sec [4068.12333 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.144s => 2084974.3 decodes/sec [1438.8666699999985/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 13 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: JSON:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.461s => 650720.8 encodes/sec [4610.272499999998 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.238s => 1262689.8 decodes/sec [2375.8804200000004/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 21 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:184:14: [script 2]: ---------------------------------------------------------
[aa1a8] [benchmarks/wota_nota_json.js:167:14: [script 2]: SCENARIO: Strings (short, emoji)
[aa1a8] [benchmarks/wota_nota_json.js:168:14: [script 2]: Data length: 3 | Iterations: 100000
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Wota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.244s => 1228095.8 encodes/sec [2442.80625 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.184s => 1633333.4 decodes/sec [1836.7345800000035/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 136 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Nota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.267s => 1122322.0 encodes/sec [2673.029589999998 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.191s => 1572376.1 decodes/sec [1907.9404200000026/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 33 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: JSON:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.352s => 851527.2 encodes/sec [3523.0816699999946 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.201s => 1493637.1 decodes/sec [2008.5200000000025/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 34 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:184:14: [script 2]: ---------------------------------------------------------
[aa1a8] [benchmarks/wota_nota_json.js:167:14: [script 2]: SCENARIO: Small Objects
[aa1a8] [benchmarks/wota_nota_json.js:168:14: [script 2]: Data length: 2 | Iterations: 50000
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Wota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.159s => 627844.4 encodes/sec [3185.502500000013 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.137s => 731327.4 decodes/sec [2734.753320000003/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 216 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Nota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.192s => 519778.9 encodes/sec [3847.79 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.146s => 684564.4 decodes/sec [2921.5658400000066/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 30 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: JSON:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.350s => 285307.9 encodes/sec [7009.971679999989 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.199s => 502402.6 decodes/sec [3980.8708400000014/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 84 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:184:14: [script 2]: ---------------------------------------------------------
[aa1a8] [benchmarks/wota_nota_json.js:167:14: [script 2]: SCENARIO: Nested Arrays
[aa1a8] [benchmarks/wota_nota_json.js:168:14: [script 2]: Data length: 3 | Iterations: 50000
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Wota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.273s => 549381.4 encodes/sec [5460.687499999999 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.171s => 874901.7 decodes/sec [3428.9566599999866/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 152 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Nota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.290s => 517256.8 encodes/sec [5799.82750000001 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.172s => 871843.8 decodes/sec [3440.983339999999/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 19 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: JSON:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.564s => 265764.7 encodes/sec [11288.182500000003 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.260s => 575976.2 decodes/sec [5208.548339999997/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 110 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:184:14: [script 2]: ---------------------------------------------------------
[aa1a8] [benchmarks/wota_nota_json.js:167:14: [script 2]: SCENARIO: Large Array (1k integers)
[aa1a8] [benchmarks/wota_nota_json.js:168:14: [script 2]: Data length: 1 | Iterations: 1000
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Wota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.033s => 30175.5 encodes/sec [33139.499999999876 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.029s => 34911.0 decodes/sec [28644.25000000015/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 8008 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Nota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.053s => 18851.4 encodes/sec [53046.58299999953 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.029s => 34756.7 decodes/sec [28771.45800000047/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 1994 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: JSON:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.148s => 6775.1 encodes/sec [147600.33399999983 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.170s => 5875.5 decodes/sec [170197.66599999997/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 5892 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:184:14: [script 2]: ---------------------------------------------------------
[aa1a8] [benchmarks/wota_nota_json.js:167:14: [script 2]: SCENARIO: Large Binary Blob (256KB)
[aa1a8] [benchmarks/wota_nota_json.js:168:14: [script 2]: Data length: 1 | Iterations: 200
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Wota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.016s => 12556.4 encodes/sec [79640.62500000147 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.019s => 10297.6 decodes/sec [97109.78999999398/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 262152 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: Nota:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.002s => 118703.2 encodes/sec [8424.37500000237 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.002s => 121074.5 decodes/sec [8259.375000001512/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 262148 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:178:16: [script 2]: JSON:
[aa1a8] [benchmarks/wota_nota_json.js:179:16: [script 2]: Encode time: 0.000s => 504572.7 encodes/sec [1981.874999996691 ns/try]
[aa1a8] [benchmarks/wota_nota_json.js:180:16: [script 2]: Decode time: 0.000s => 996467.5 decodes/sec [1003.5449999978852/try]
[aa1a8] [benchmarks/wota_nota_json.js:181:16: [script 2]: Total size: 2 bytes (or code units for JSON)
[aa1a8] [benchmarks/wota_nota_json.js:182:16: [script 2]:
[aa1a8] [benchmarks/wota_nota_json.js:184:14: [script 2]: ---------------------------------------------------------
Writing an integer should be about as fast as writing an empty object; so something must be up.