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
Testing DataStorage.js performance increases for repeatedly accessing Objects in localStorage.
<script src="https://raw.github.com/marcneuwirth/datastorage.js/master/dataStorage.js"></script>
localStorage = localStorage || {};
var storageArray = {};
var small = {
"main": "MAIN",
"skip_scan": "SKIP_SCAN",
"cmpnt_ver": "CMPNT_VER",
"scan_manual_scanning": "SCAN_MANUAL",
"scan_manual_target": "SCAN_MANUAL",
"update": "UPDATE",
"logs": "LOGS",
"settings": "SETTINGS",
"tools": "TOOLS",
"threat_details": "THREAT_DETAILS",
"popup_chk_pwd_shutdown": "POPUP_CHK_PWD_SHUTDOWN",
"popup_chk_pwd_unlock": "POPUP_CHK_PWD_UNLOCK",
"popup_bm_ask": "POPUP_BM_ASK",
"popup_rt_detect_result_info": "POPUP_RT_DETECT_RESULT_INFO",
"popup_wifi": "POPUP_WIFI",
"popup_fa_restore": "POPUP_FA_RESTORE",
"popup_restart_xxx": "POPUP_RESTART_XXX",
"popup_shutdown_pc": "POPUP_SHUTDOWN_PC",
"popup_restart_driver": "POPUP_RESTART_DRIVER",
"popup_chk_scan": "POPUP_CHK_SCAN",
"popup_usb_encrypt_pwd": "POPUP_USB_ENCRYPT_PWD",
"*": "ID_UIPOPUP_update.html => shold be replaced by 'update'"
}
storageArray['small'] = small;
localStorage['small'] = JSON.stringify(small);
dataStorage.putData('small', small);
Ready to run.
Test | Ops/sec | |
---|---|---|
Small: JSON Parse |
| ready |
Small: No Parse Lookup |
| ready |
Small: DataStorage |
| ready |
Med: JSON Parse |
| ready |
Med: No Parse Lookup |
| ready |
Med: DataStorage |
| ready |
Large: JSON Parse |
| ready |
Large: No Parse Lookup |
| ready |
Large: DataStorage |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.