Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
named vs positional arguments v1
(version: 1)
Comparing performance of:
pargs vs nargs
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const columns = Array.from({ length: 10 }, (_, i) => `column-${i}`) const rows = Array.from({ length: 1_000 }, (_, i) => `row-${i}`) function pargs(row, column) { return row.length + column.length; } function nargs({ row, column }) { return row.length + column.length; }
Tests:
pargs
for (const row in rows) { for (const column in columns) { pargs(row, column) } }
nargs
for (const row in rows) { for (const column in columns) { nargs({ row, column }) } }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
pargs
nargs
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser/OS:
Chrome 132 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
pargs
6289.6 Ops/sec
nargs
6302.3 Ops/sec
Related benchmarks:
Array creation
using data set. array vs object
object readings
Storing array length before for
same test
qwe1234123
test another
Function vs () =>
named vs positional arguments v2
Comments
Confirm delete:
Do you really want to delete benchmark?