Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
UUIDv4 + version string splitting options
(version: 1)
Comparing performance of:
split vs match vs slice by 36 (UUIDv4)
Created:
11 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const string = "719cd2c5-f05c-40b2-9ca6-6b889d22e069:v23";
Tests:
split
const [id, v] = string.split(":");
match
const [,id, v] = string.match(/^([0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}):v(\d+)$/i);
slice by 36 (UUIDv4)
const id = string.slice(0, 36); const v = string.slice(38);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
split
match
slice by 36 (UUIDv4)
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
11 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0
Browser/OS:
Firefox 139 on Mac OS X 10.15
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
split
12040816.0 Ops/sec
match
10762219.0 Ops/sec
slice by 36 (UUIDv4)
295005536.0 Ops/sec
Related benchmarks:
Regex vs split/join vs substring
String Split Test
Regex v split find str
Regex extract info
Regex extract info vs Split
Regex vs String.includes in Array.filter v2
RegEx.test vs. String.includes vs. for
Regex vs startswith and slice single
UUIDv4 + version string splitting
Comments
Confirm delete:
Do you really want to delete benchmark?