Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
jsspltttttttt
(version: 0)
Comparing performance of:
testttttt vs tesstttt2 vs tesstttt3 vs tesstttt4 vs tesstttt5
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var strTxt = Array(100).fill("@".repeat(128)).join(" "), len = 128;
Tests:
testttttt
var ar = strTxt.match(new RegExp('.{1,'+len+'}','g'));
tesstttt2
var ar = Array(Math.ceil(strTxt.length/len)), arlen=ar.length; for(i=0,y=0;i<arlen;i++,y=i*len){ ar[i] = strTxt.slice(y,y+len); }
tesstttt3
var ar = Array(Math.ceil(strTxt.length/len)), arlen=ar.length; for(i=0,y=0;i<arlen;i++,y=i*len){ ar[i] = strTxt.substr(y,len); }
tesstttt4
var ar = Array(Math.ceil(strTxt.length/len)), arlen=ar.length,i = 0; while(i<arlen){ ar[i] = strTxt.slice(i*len,i*len+len); i++; }
tesstttt5
var ar = Array(Math.ceil(strTxt.length/len)), arlen=ar.length,i = 0; while(i<arlen){ ar[i] = strTxt.substr(i*len,len); i++; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (5)
Previous results
Fork
Test case name
Result
testttttt
tesstttt2
tesstttt3
tesstttt4
tesstttt5
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
jssplttttttt
Text.data vs Text.nodeValue
Random ID generate
string concat big string
Comments
Confirm delete:
Do you really want to delete benchmark?