rd13 / jsperf.app

jsperf-app.vercel.app
77 stars 6 forks source link

Can I run jsperf benchmarks in Nodejs? #38

Open albertodiazdorado opened 4 months ago

albertodiazdorado commented 4 months ago

[Sorry if this is not the right place to make this question]

Can I somehow run the jsperf benchmarks on my machine with the nodejs version of my choice?

rd13 commented 4 months ago

@albertodiazdorado Yes you can by importing benchmark.js:

const Benchmark = require('benchmark');
const suite = new Benchmark.Suite;
...

I'm working on a way to run Node benchmarks from the browser on jsperf.app.