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
function getSwitch (name) {
switch (name) {
case 'broadcast': return 'mdiBullhorn'
case 'clean': return 'mdiDelete'
case 'editRuntime': return 'mdiPlaylistEdit'
case 'hold': return 'mdiPauseCircleOutline' // to distinguish from pause
case 'kill': return 'mdiCloseCircle'
case 'log': return 'mdiFileDocumentOutline'
case 'message': return 'mdiEmail'
case 'pause': return 'mdiPause'
case 'play': return 'mdiPlay'
case 'poll': return 'mdiRefreshCircle'
case 'release': return 'mdiPlayCircleOutline' // to distinguish from play
case 'reload': return 'mdiReload'
case 'remove': return 'mdiMinusCircleOutline'
case 'resume': return 'mdiPlay'
case 'set': return 'mdiVectorPolylineEdit'
case 'stop': return 'mdiStop'
case 'trigger': return 'mdiCursorPointer'
default: return 'mdiCog'
}
}
const mutationIcons = {
broadcast: 'mdiBullhorn',
clean: 'mdiDelete',
editRuntime: 'mdiPlaylistEdit',
hold: 'mdiPauseCircleOutline', // to distinguish from pause
kill: 'mdiCloseCircle',
log: 'mdiFileDocumentOutline',
message: 'mdiEmail',
pause: 'mdiPause',
play: 'mdiPlay',
poll: 'mdiRefreshCircle',
release: 'mdiPlayCircleOutline', // to distinguish from play
reload: 'mdiReload',
remove: 'mdiMinusCircleOutline',
resume: 'mdiPlay',
set: 'mdiVectorPolylineEdit',
stop: 'mdiStop',
trigger: 'mdiCursorPointer'
}
function getObj (name) {
return mutationIcons[name] ?? 'mdiCog'
}
const getObj2 = (name) => (
{
broadcast: 'mdiBullhorn',
clean: 'mdiDelete',
editRuntime: 'mdiPlaylistEdit',
hold: 'mdiPauseCircleOutline', // to distinguish from pause
kill: 'mdiCloseCircle',
log: 'mdiFileDocumentOutline',
message: 'mdiEmail',
pause: 'mdiPause',
play: 'mdiPlay',
poll: 'mdiRefreshCircle',
release: 'mdiPlayCircleOutline', // to distinguish from play
reload: 'mdiReload',
remove: 'mdiMinusCircleOutline',
resume: 'mdiPlay',
set: 'mdiVectorPolylineEdit',
stop: 'mdiStop',
trigger: 'mdiCursorPointer'
}[name] ?? 'mdiCog'
)
Ready to run.
Test | Ops/sec | |
---|---|---|
switch |
| ready |
obj |
| ready |
obj2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.