INNER CODE UNIT · JavaScript

filter

ethereum/mpz · crates/wasm-bench/js/main.js:99

            const filter = benchmarksParam ? benchmarksParam.split(',').filter(s => s) : null;
            const concurrencyParam = params.get('concurrency');
            const concurrency = concurrencyParam ? parseInt(concurrencyParam) : (navigator.hardwareConcurrency || 8);

            // Only initialize thread pool if MT benchmarks are selected
            const needsMT = bench.needsThreadPool(filter, concurrency);
            if (needsMT) {
                console.log(`Initializing thread pool with ${concurrency} threads...`);
                setStatus(`Initializing thread pool (${concurrency} threads)...`);
                await wasm.init_thread_pool(concurrency);
                console.log('Thread pool initialized');
            } else {
                console.log('Skipping thread pool init (no MT benchmarks selected)');
            }

            console.log(`Autorun triggered: iterations=${iterations}, samples=${samples}, benchmarks=${benchmarksParam}, concurrency=${concurrency}`);
            iterationsInput.value = iterations;
            samplesInput.value = samples;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…