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
<script src="
https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js
"></script>
function clone(obj) {
if (obj == null || typeof obj != "object") {
return obj;
}
try {
const temp = new obj.constructor();
for(const key in obj){
temp[key] = clone(obj[key]);
}
return temp;
} catch (e) {
return _.cloneDeep(obj);
}
}
const data = {
"id": "chatcmpl-8KoJwsI6naYRYgsJDx3zsjNIY2bo2",
"object": "chat.completion",
"created": 1699970684,
"model": "gpt-4-1106-vision-preview",
"usage": {
"prompt_tokens": 805,
"completion_tokens": 103,
"total_tokens": 908
},
"choices": [
{
"message": {
"role": "assistant",
"content": "```\nbarcode,quantity,price\n2035958000000,4.00000000```"
},
"finish_details": {
"type": "stop",
"stop": "<|fim_suffix|>"
},
"index": 0
}
]
}
data.self = data
Ready to run.
Test | Ops/sec | |
---|---|---|
Basic |
| ready |
Lodash |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.