jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
const PluginCopyWebpackByConfig = (copy) => {
const copyParams = [];
Object.keys(copy).forEach((copyConfig) => {
if (!Array.isArray(copy[copyConfig])) {
copy[copyConfig] = [copy[copyConfig]];
}
copy[copyConfig].forEach(value => copyParams.push(value));
});
};
const PluginCopyWebpackByConfigNew = (copy) => {
const copyParams = Object.entries(copy)
.flatMap(([, value]) => (Array.isArray(value) ? value : [value]));
};
const PluginCopyWebpackByConfigValues = (copy) => {
const copyParams = [];
Object.values(copy).forEach((copyConfig) => {
if (!Array.isArray(copyConfig)) {
copyConfig = [copyConfig];
}
copyConfig.forEach(value => copyParams.push(value));
});
};
const data = {
debugbar: [
{
from: '*.js',
to: './js',
context: 'node_modules/php-debugbar/src/DebugBar/Resources'
},
{
from: 'widget.js',
to: './js',
context: 'node_modules/php-debugbar/src/DebugBar/Resources/widgets/templates'
}
],
images: {
from: '**/*',
to: '../mobile/images/',
context: './src/mobile/images/',
globOptions: { ignore: [Array] }
},
favicons: { from: '**/*', to: './favicons', context: './src/common/favicons/' },
manifest: {
from: './manifest.json',
to: './manifest.json',
context: './src/mobile/'
},
browserconfig: {
from: './browserconfig.xml',
to: './browserconfig.xml',
context: './src/mobile/'
}
};
Ready to run.
Test | Ops/sec | |
---|---|---|
original |
| ready |
newOptimize |
| ready |
newValues |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.