RESULTS-v24.md

October 15, 2025 ยท View on GitHub

Adding property

nameops/secsamples
Directly in the object77,851,27139031866
Using dot notation78,379,13739189578
Using define property (writable)4,964,8642482434
Using define property initialized (writable)6,984,3633492528
Using define property (getter)2,311,2561155808
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 20:50:32 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Array.append (number)

typeamounttime elapsed
array.push100.004ms
new Array(length)100.002ms
array.push1000.023ms
new Array(length)1000.008ms
array.push1,0000.037ms
new Array(length)1,0000.021ms
array.push10,0000.457ms
new Array(length)10,0000.253ms
array.push1,000,00028.209ms
new Array(length)1,000,0007.835ms
array.push10,000,000238.906ms
new Array(length)10,000,00068.185ms

Array.append (string)

typeamounttime elapsed
array.push100.004ms
new Array(length)100.003ms
array.push1000.015ms
new Array(length)1000.011ms
array.push1,0000.036ms
new Array(length)1,0000.018ms
array.push10,0000.383ms
new Array(length)10,0000.13ms
array.push1,000,00018.097ms
new Array(length)1,000,00011.014ms
array.push10,000,000360.993ms
new Array(length)10,000,00051.209ms

Array Creation

nameops/secsamples
new Array303152
Array.from2312
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 20:56:59 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Blob

nameops/secsamples
new Blob (128)4,9982500
new Blob (1024)672343
text (128)4,7052358
text (1024)581291
arrayBuffer (128)4,6922347
arrayBuffer (1024)580292
slice (0, 64)153,43585077
slice (0, 512)31,06915539
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:02:08 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Compression algorithms

nametotal timesamples
Deflate133.97 ms1
Gzip136.11 ms1
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:10:08 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Crypto Verify

nameops/secsamples
crypto.createVerify('RSA-SHA256')21,44410723
crypto.verify('RSA-SHA256')21,57810804
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:14:28 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Date toISOString

nameops/secsamples
new Date().toISOString()1,565,729782865
fromUnixToISOString(new Date())2,996,4841498363
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:18:58 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Date format MM/DD/YYYY

nameops/secsamples
Intl.DateTimeFormat().format(Date.now())22,10911055
Intl.DateTimeFormat().format(new Date())20,82710414
Intl.DateTimeFormat(undefined, twoDigitsLocaleOptions).format(Date.now())21,04410523
Intl.DateTimeFormat(undefined, twoDigitsLocaleOptions).format(new Date())19,9349968
Reusing Intl.DateTimeFormat()444,691222348
Date.toLocaleDateString()1,048,253524132
Date.toLocaleDateString(undefined, twoDigitsLocaleOptions)26,40313203
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:22:52 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Date String coersion

nameops/secsamples
Using String()1,109,727554888
Using brackets {}1,115,874558044
Using '' +1,118,676559917
Using date.toString()1,262,021631012
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:26:29 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Deleting properties

nameops/secsamples
Using delete property4,211,4992105821
Using delete property (proto: null)18,246,3439125807
Using delete property (cached proto: null)4,305,8002153307
Using undefined assignment79,334,06339673481
Using undefined assignment (proto: null)20,417,02810215241
Using undefined property (cached proto: null)78,733,87439370890
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:31:45 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Node.js Error

nameops/secsamples
Error355,748177898
NodeError325,767162891
NodeError Range311,059155565
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:36:48 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Array.includes vs raw comparison

nameops/secsamples
using Array.includes68,517,54334263713
using Array.includes (first item)73,639,85436819936
Using raw comparison99,095,51749547868
Using raw comparison (first item)96,268,41748145794
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:40:39 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Object.keys vs Object.getOwnPropertyNames comparison

nameops/secsamples
Using Object.keys()44,420,19522211728
Using Object.getOwnPropertyNames()47,639,46023826904
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:43:14 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Get the last item of an Array

nameops/secsamples
Length = 100 - Array.at91,613,13045806576
Length = 10_000 - Array.at90,904,93145452473
Length = 1_000_000 - Array.at91,665,79045832921
Length = 100 - Array[length - 1]89,528,53044764291
Length = 10_000 - Array[length - 1]90,686,14245383290
Length = 1_000_000 - Array[length - 1]90,670,13445335179
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:49:31 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Math.floor vs ~

nameops/secsamples
Math.floor (small)89,274,99444650992
~ (small)95,382,16247691099
Math.floor (long)95,054,38047535973
~ (long)95,733,57247866795
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:53:16 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Object Creation

nameops/secsamples
Object.create(null)36,792,86218401246
Object.create({})2,056,3631028183
new Function with empty prototype67,269,45833638643
Empty class77,857,24338940124
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 21:56:26 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Parsing Integer

nameops/secsamples
Using parseInt(x, 10) - small number (2 len)95,619,90447868658
Using parseInt(x, 10) - big number (10 len)95,955,69347977853
Using + - small number (2 len)94,720,12547404866
Using + - big number (10 len)92,308,08046154139
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:01:20 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Possible undefined Function

nameops/secsamples
Using if to check function existence1,062,706531364
Using ? operator to avoid rejection1,110,436557069
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:02:56 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Private Property

nameops/secsamples
Raw usage private field93,860,77146931176
Raw usage underscore usage97,058,81348598604
Manipulating private properties using #97,606,40848803233
Manipulating private properties using underscore(_)95,906,00747953012
Manipulating private properties using Symbol97,889,24048944631
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:09:04 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Property access after shape transition

nameops/secsamples
Adding property after object creation - small object7,348,4983674290
Adding property in the object creation - small object7,394,1503697077
Adding property after the function creation - small class275,386137695
Adding property in the function creation - small class281,506140755
Adding property after the class creation - small class272,497139928
Adding property in the class creation - small class278,505139253
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:13:42 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Property Getter Access

nameops/secsamples
Getter (class)86,609,55143572828
Getter52,407,08426209954
Method95,371,57647686644
DefineProperty (getter)95,104,98947554359
DefineProperty (getter & enumerable=false)53,396,12326698073
DefineProperty (getter & configurable=false)94,642,37647321193
DefineProperty (getter & enumerable=false & configurable=false)53,902,53626953099
DefineProperty (writable)96,042,67348021437
DefineProperty (writable & enumerable=false)93,318,25446811880
DefineProperty (writable & enumerable=false & configurable=false)94,907,78347459619
DefineProperties (getter)53,483,65426742312
DefineProperties (getter & enumerable=false)53,736,81126871334
DefineProperties (getter & enumerable=false & configurable=false)53,699,67426862936
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:15:09 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Property Setter Access

nameops/secsamples
Setter (class)90,514,91745257483
Setter10,491,1995245603
Method90,010,79045005397
DefineProperty (setter)90,484,05745242860
DefineProperty (setter & enumerable=false)10,533,9315267045
DefineProperty (setter & configurable=false)10,614,5405307479
DefineProperty (setter & enumerable=false & configurable=false)10,620,8095310654
DefineProperty (writable)90,478,47145257623
DefineProperty (writable & enumerable=false)89,407,96844704164
DefineProperty (writable & enumerable=false & configurable=false)90,798,98345400091
DefineProperties (setter)90,821,20045415624
DefineProperties (setter & enumerable=false)10,478,6835239345
DefineProperties (setter & enumerable=false & configurable=false)10,489,0365244521
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:20:38 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

replace vs replaceAll comparison

nameops/secsamples
Using replace(//g)3,997,3081998993
Using replaceAll()3,107,9231553963
Using replaceAll(//g)3,454,4431727604
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:27:13 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Shallow Copy

nameops/secsamples
{ ...object }24,706,20812353976
{ ...object, proto: null }2,359,6451180748
{ ...object, newProp: true }23,531,55211765780
structuredClone291,433145717
JSON.parse + JSON.stringify312,694156348
loop + object.keys starting with {}1,730,555865383
loop + object.keys starting with { proto: null }933,491466822
loop + object.keys starting with { randomProp: true }684,452342305
object.keys + reduce(FN, {})1,780,388890195
object.keys + reduce(FN, { proto: null })945,635472890
object.keys + reduce(FN, { newProp: true })705,259352692
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:31:19 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Sorting Map

nameops/secsamples
Sort using default323,714161862
Sort using first char1,348,933674530
Sort using localeCompare1,241,749620964
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:36:59 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Object.assign VS spread operator

nameops/secsamples
{...bigObject} - Total keys: 10003,0581530
{...smallObject} - Total keys: 240,841,74020420981
Object.assign({}, bigObject, anotherBigObject) - Total keys: 1000 - creating new object1,094548
Object.assign(bigObject, anotherBigObject) - mutating bigObject6,1893095
{ ...bigObject, ...anotherBigObject }1,518760
Object.assign({}, smallObject, anotherSmallObject) - creating new object12,489,2736244644
Object.assign(smallObject, anotherSmallObject) - mutating smallObject27,859,20913929840
{ ...smallObject, ...anotherSmallObject }20,392,37710198596
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:40:58 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Stream.Readable

nameops/secsamples
streams.Readable reading 1e3 * "some data"2,0541028
streams.web.Readable reading 1e3 * "some data"1,755879
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:46:45 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Stream.Writable

nameops/secsamples
streams.Writable writing 1e3 * "some data"10,0665034
streams.web.WritableStream writing 1e3 * "some data"1,662892
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:50:43 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

String concat

nameops/secsamples
Using + sign94,885,18947481732
Using backtick (`)95,026,21547513578
Using array.join10,688,5935345232
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:53:55 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

endsWith comparison

nameops/secsamples
(short string) (true) String#endsWith81,513,88640756945
(short string) (true) String#slice and strict comparison56,440,80128223929
(long string) (true) String#endsWith67,652,96133829303
(long string) (true) String#slice and strict comparison51,395,41825703665
(short string) (false) String#endsWith88,438,40144219212
(short string) (false) String#slice and strict comparison57,707,46028853735
(long string) (false) String#endsWith82,542,14041271090
(long string) (false) String#slice and strict comparison52,645,88126322947
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 22:58:01 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

String searching

nameops/secsamples
Using includes16,601,2068300611
Using indexof16,611,6578307148
Using RegExp.test12,682,6246341816
Using RegExp.text with cached regex pattern13,536,9796768493
Using new RegExp.test4,641,1462320574
Using new RegExp.test with cached regex pattern5,275,7562638445
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 23:01:50 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

startsWith comparison

nameops/secsamples
(short string) (true) String#startsWith73,973,51836986768
(short string) (true) String#slice and strict comparison56,174,72128088050
(long string) (true) String#startsWith64,344,94632175480
(long string) (true) String#slice and strict comparison52,310,43826155228
(short string) (false) String#startsWith80,088,22240045416
(short string) (false) String#slice and strict comparison58,149,07629081341
(long string) (false) String#startsWith78,313,62739158047
(long string) (false) String#slice and strict comparison52,871,01426435517
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 23:05:03 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Super vs This

nameops/secsamples
Using super91,800,39145900221
Using this98,700,76349350393
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 23:11:47 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0

Getting unix time

nameops/secsamples
new Date().getTime()12,582,1966292043
Date.now()20,385,43210193865
Environment
  • Machine: linux x64 | 4 vCPUs | 7.6GB Mem
  • Run: Wed Oct 15 2025 23:15:03 GMT+0000 (Coordinated Universal Time)
  • Node: v24.9.0