Crypto Wasm
    Preparing search index...

    Interface BenchmarkResult

    Performance comparison between JS and WASM implementations.

    import type { BenchmarkResult } from "@aspect/crypto-wasm";

    const result: BenchmarkResult = {
    operation: "hash-sha256",
    jsTimeMs: 120,
    wasmTimeMs: 45,
    speedup: 2.67,
    };
    interface BenchmarkResult {
        operation: AcceleratedOperation;
        jsTimeMs: number;
        wasmTimeMs: number;
        speedup: number;
    }
    Index

    The accelerated operation being benchmarked.

    jsTimeMs: number

    Execution time of the pure-JS implementation in milliseconds.

    wasmTimeMs: number

    Execution time of the WASM implementation in milliseconds.

    speedup: number

    Ratio of JS time to WASM time (values above 1 mean WASM is faster).