Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array.slice vs TypedArray.slice
(version: 1)
Array.slice vs TypedArray.slice
Comparing performance of:
testArraySlice vs testTypedArraySlice
Created:
5 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function testArraySlice() { (function () { const source = new Array(10000); for (let i = 0; i < 10000; i++) source[i] = i; const chunk = source.slice(1000, 9000); })(); } function testTypedArraySlice() { (function () { const source = new Uint8Array(10000); for (let i = 0; i < 10000; i++) source[i] = i; const chunk = source.slice(1000, 9000); })(); }
Tests:
testArraySlice
testArraySlice()
testTypedArraySlice
testTypedArraySlice()
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
testArraySlice
testTypedArraySlice
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
4 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0
Browser/OS:
Firefox 146 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
testArraySlice
13201.6 Ops/sec
testTypedArraySlice
48184.1 Ops/sec
Related benchmarks:
js array perfomance
converting arguments to Array
Array vs SubArray splice
map vs for vs for (init array)
qwe1234123
for-of-foreach
Arguments to Array - by Jeeeyul
TestLoop
TypedArray slice vs subarray
Comments
Confirm delete:
Do you really want to delete benchmark?