Sha256: 899f3d88c95f0f02563f869fd683a9c95afb1a8c773edf2d0a8d3355f1ceb07c

Contents?: true

Size: 948 Bytes

Versions: 30

Compression:

Stored size: 948 Bytes

Contents

import os
import os.path
import json

comparisons = []

for (root, _dirs, files) in os.walk('target/criterion'):
    for file in files:
        if file == 'estimates.json' and root.endswith(
                'new') and 'TinyVec' in root:
            path = os.path.join(root, file)

            bench_name = path.split('/')[3]
            tinyvec_time = json.load(open(path))['mean']['point_estimate']

            path = path.replace('TinyVec', 'SmallVec')

            smallvec_time = json.load(open(path))['mean']['point_estimate']

            comparisons.append((bench_name, tinyvec_time / smallvec_time))

comparisons.sort(key=lambda x: x[1])
longest_name = max(len(c[0]) for c in comparisons)
for (name, ratio) in comparisons:
    # Undo the criterion name mangling
    name = name.replace('_[', '<[')
    name = name.replace(']___', ']>::')

    name = name.ljust(longest_name)
    print(f"{name} {ratio:.2f}")

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wasmtime-23.0.2 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-22.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-21.0.1 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-20.0.2 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-20.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-18.0.3 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-17.0.1 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-17.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-16.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-15.0.1 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-15.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-14.0.4 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-14.0.3 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-14.0.1 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-14.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-13.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-12.0.1 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-12.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-11.0.0 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py
wasmtime-10.0.1 ./ext/cargo-vendor/tinyvec-1.6.0/compare_benchmarks.py