From 465f74a86c8521b77152cc6c6ac0c2b64f5fbb03 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 3 Oct 2023 02:16:55 +0000 Subject: [PATCH] chore(unix-time.js): update benchmark results --- RESULTS-v16.md | 17 ++++------------- RESULTS-v18.md | 8 ++++---- RESULTS-v19.md | 12 ++++-------- RESULTS-v20.md | 12 ++++-------- v16/RESULTS-v16_0_0.md | 8 ++++---- v16/RESULTS-v16_18_1.md | 8 ++++---- v16/RESULTS-v16_19_0.md | 8 ++++---- v16/RESULTS-v16_20_0.md | 17 ++++------------- v16/v16_0_0/unix-time.md | 8 ++++---- v16/v16_18_1/unix-time.md | 8 ++++---- v16/v16_19_0/unix-time.md | 8 ++++---- v16/v16_20_0/unix-time.md | 17 ++++------------- v18/RESULTS-v18_0_0.md | 12 ++++-------- v18/RESULTS-v18_14_2.md | 6 +++--- v18/RESULTS-v18_15_0.md | 12 ++++-------- v18/RESULTS-v18_16_0.md | 8 ++++---- v18/v18_0_0/unix-time.md | 12 ++++-------- v18/v18_14_2/unix-time.md | 6 +++--- v18/v18_15_0/unix-time.md | 12 ++++-------- v18/v18_16_0/unix-time.md | 8 ++++---- v19/RESULTS-v19_0_0.md | 10 ++++------ v19/RESULTS-v19_8_0.md | 9 ++++----- v19/RESULTS-v19_8_1.md | 8 ++++---- v19/RESULTS-v19_9_0.md | 12 ++++-------- v19/v19_0_0/unix-time.md | 10 ++++------ v19/v19_8_0/unix-time.md | 9 ++++----- v19/v19_8_1/unix-time.md | 8 ++++---- v19/v19_9_0/unix-time.md | 12 ++++-------- v20/RESULTS-v20_0_0.md | 12 ++++-------- v20/v20_0_0/unix-time.md | 12 ++++-------- 30 files changed, 118 insertions(+), 191 deletions(-) diff --git a/RESULTS-v16.md b/RESULTS-v16.md index 4b2c2dba..ffd9a623 100644 --- a/RESULTS-v16.md +++ b/RESULTS-v16.md @@ -633,27 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Shallow Copy +## Getting unix time |name|ops/sec|samples| |-|-|-| -|{ ...object }|13,634,170|91| -|{ ...object, __proto__: null }|13,424,046|94| -|{ ...object, newProp: true }|510,574|85| -|structuredClone|0|0| -|JSON.parse + JSON.stringify|144,585|98| -|loop + object.keys starting with {}|328,752|92| -|loop + object.keys starting with { __proto__: null }|434,923|94| -|loop + object.keys starting with { randomProp: true }|341,338|96| -|object.keys + reduce(FN, {})|333,113|97| -|object.keys + reduce(FN, { __proto__: null })|426,462|91| -|object.keys + reduce(FN, { newProp: true })|344,621|93| +|new Date().getTime()|7,261,299|96| +|Date.now()|14,220,634|95|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:53:53 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:24 GMT+0000 (Coordinated Universal Time)
diff --git a/RESULTS-v18.md b/RESULTS-v18.md index d6bc3466..54cfbc4f 100644 --- a/RESULTS-v18.md +++ b/RESULTS-v18.md @@ -633,18 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Date toISOString +## Getting unix time |name|ops/sec|samples| |-|-|-| -|new Date().toISOString()|1,331,909|87| -|fromUnixToISOString(new Date())|1,118,954|97| +|new Date().getTime()|7,350,286|97| +|Date.now()|14,984,975|91|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:10:30 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:32 GMT+0000 (Coordinated Universal Time)
diff --git a/RESULTS-v19.md b/RESULTS-v19.md index 2f77aacc..ec949f95 100644 --- a/RESULTS-v19.md +++ b/RESULTS-v19.md @@ -633,22 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Private Property +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Raw usage private field|599,283,380|99| -|Raw usage underscore usage|597,207,510|99| -|Manipulating private properties using #|594,026,209|96| -|Manipulating private properties using underscore(_)|595,294,492|99| -|Manipulating private properties using Symbol|593,550,801|99| -|Manipulating private properties using PrivateSymbol|39,479,382|98| +|new Date().getTime()|8,738,388|89| +|Date.now()|15,585,953|96|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:40:51 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:28 GMT+0000 (Coordinated Universal Time)
diff --git a/RESULTS-v20.md b/RESULTS-v20.md index 37632de2..953c269e 100644 --- a/RESULTS-v20.md +++ b/RESULTS-v20.md @@ -652,22 +652,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Get the last item of an Array +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Length = 100 - Array.at|598,582,230|95| -|Length = 10_000 - Array.at|600,602,977|97| -|Length = 1_000_000 - Array.at|603,097,763|99| -|Length = 100 - Array[length - 1]|596,218,433|98| -|Length = 10_000 - Array[length - 1]|596,822,236|97| -|Length = 1_000_000 - Array[length - 1]|596,539,154|98| +|new Date().getTime()|7,282,776|92| +|Date.now()|14,308,152|94|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:26:53 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:33 GMT+0000 (Coordinated Universal Time)
diff --git a/v16/RESULTS-v16_0_0.md b/v16/RESULTS-v16_0_0.md index 0e98aeae..370a45fe 100644 --- a/v16/RESULTS-v16_0_0.md +++ b/v16/RESULTS-v16_0_0.md @@ -619,18 +619,18 @@ new Array(length)|100,000,000|4,508.701ms -## Deleting properties +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Using delete property|1,692,524|88| -|Using undefined assignment|564,278,692|86| +|new Date().getTime()|7,345,326|97| +|Date.now()|14,136,590|95|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:17:07 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:27 GMT+0000 (Coordinated Universal Time)
diff --git a/v16/RESULTS-v16_18_1.md b/v16/RESULTS-v16_18_1.md index 0fefeaed..813f7681 100644 --- a/v16/RESULTS-v16_18_1.md +++ b/v16/RESULTS-v16_18_1.md @@ -633,18 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Array Creation +## Getting unix time |name|ops/sec|samples| |-|-|-| -|new Array|243|77| -|Array.from|11|32| +|new Date().getTime()|7,829,945|95| +|Date.now()|14,470,130|97|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:05:50 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:28 GMT+0000 (Coordinated Universal Time)
diff --git a/v16/RESULTS-v16_19_0.md b/v16/RESULTS-v16_19_0.md index 63789e47..1a884579 100644 --- a/v16/RESULTS-v16_19_0.md +++ b/v16/RESULTS-v16_19_0.md @@ -633,18 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Date toISOString +## Getting unix time |name|ops/sec|samples| |-|-|-| -|new Date().toISOString()|1,610,281|95| -|fromUnixToISOString(new Date())|1,389,989|98| +|new Date().getTime()|7,418,390|93| +|Date.now()|14,262,652|98|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:10:27 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:24 GMT+0000 (Coordinated Universal Time)
diff --git a/v16/RESULTS-v16_20_0.md b/v16/RESULTS-v16_20_0.md index 4b2c2dba..ffd9a623 100644 --- a/v16/RESULTS-v16_20_0.md +++ b/v16/RESULTS-v16_20_0.md @@ -633,27 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Shallow Copy +## Getting unix time |name|ops/sec|samples| |-|-|-| -|{ ...object }|13,634,170|91| -|{ ...object, __proto__: null }|13,424,046|94| -|{ ...object, newProp: true }|510,574|85| -|structuredClone|0|0| -|JSON.parse + JSON.stringify|144,585|98| -|loop + object.keys starting with {}|328,752|92| -|loop + object.keys starting with { __proto__: null }|434,923|94| -|loop + object.keys starting with { randomProp: true }|341,338|96| -|object.keys + reduce(FN, {})|333,113|97| -|object.keys + reduce(FN, { __proto__: null })|426,462|91| -|object.keys + reduce(FN, { newProp: true })|344,621|93| +|new Date().getTime()|7,261,299|96| +|Date.now()|14,220,634|95|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:53:53 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:24 GMT+0000 (Coordinated Universal Time)
diff --git a/v16/v16_0_0/unix-time.md b/v16/v16_0_0/unix-time.md index 52c0b05c..aa54becb 100644 --- a/v16/v16_0_0/unix-time.md +++ b/v16/v16_0_0/unix-time.md @@ -1,15 +1,15 @@ -## Deleting properties +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Using delete property|1,692,524|88| -|Using undefined assignment|564,278,692|86| +|new Date().getTime()|7,345,326|97| +|Date.now()|14,136,590|95|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:17:07 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:27 GMT+0000 (Coordinated Universal Time)
diff --git a/v16/v16_18_1/unix-time.md b/v16/v16_18_1/unix-time.md index babc9bd6..63e0ca45 100644 --- a/v16/v16_18_1/unix-time.md +++ b/v16/v16_18_1/unix-time.md @@ -1,15 +1,15 @@ -## Array Creation +## Getting unix time |name|ops/sec|samples| |-|-|-| -|new Array|243|77| -|Array.from|11|32| +|new Date().getTime()|7,829,945|95| +|Date.now()|14,470,130|97|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:05:50 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:28 GMT+0000 (Coordinated Universal Time)
diff --git a/v16/v16_19_0/unix-time.md b/v16/v16_19_0/unix-time.md index 8b252e02..4c05c50d 100644 --- a/v16/v16_19_0/unix-time.md +++ b/v16/v16_19_0/unix-time.md @@ -1,15 +1,15 @@ -## Date toISOString +## Getting unix time |name|ops/sec|samples| |-|-|-| -|new Date().toISOString()|1,610,281|95| -|fromUnixToISOString(new Date())|1,389,989|98| +|new Date().getTime()|7,418,390|93| +|Date.now()|14,262,652|98|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:10:27 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:24 GMT+0000 (Coordinated Universal Time)
diff --git a/v16/v16_20_0/unix-time.md b/v16/v16_20_0/unix-time.md index 1510152e..0d328ab6 100644 --- a/v16/v16_20_0/unix-time.md +++ b/v16/v16_20_0/unix-time.md @@ -1,24 +1,15 @@ -## Shallow Copy +## Getting unix time |name|ops/sec|samples| |-|-|-| -|{ ...object }|13,634,170|91| -|{ ...object, __proto__: null }|13,424,046|94| -|{ ...object, newProp: true }|510,574|85| -|structuredClone|0|0| -|JSON.parse + JSON.stringify|144,585|98| -|loop + object.keys starting with {}|328,752|92| -|loop + object.keys starting with { __proto__: null }|434,923|94| -|loop + object.keys starting with { randomProp: true }|341,338|96| -|object.keys + reduce(FN, {})|333,113|97| -|object.keys + reduce(FN, { __proto__: null })|426,462|91| -|object.keys + reduce(FN, { newProp: true })|344,621|93| +|new Date().getTime()|7,261,299|96| +|Date.now()|14,220,634|95|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:53:53 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:24 GMT+0000 (Coordinated Universal Time)
diff --git a/v18/RESULTS-v18_0_0.md b/v18/RESULTS-v18_0_0.md index 48581f57..2d8a24de 100644 --- a/v18/RESULTS-v18_0_0.md +++ b/v18/RESULTS-v18_0_0.md @@ -633,22 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Property access after shape transition +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Adding property after object creation - small object|2,016,624|81| -|Adding property in the object creation - small object|2,211,681|89| -|Adding property after the function creation - small class|144,924|75| -|Adding property in the function creation - small class|147,009|75| -|Adding property after the class creation - small class|121,193|77| -|Adding property in the class creation - small class|113,712|73| +|new Date().getTime()|5,787,742|91| +|Date.now()|12,395,067|94|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:42:40 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:31 GMT+0000 (Coordinated Universal Time)
diff --git a/v18/RESULTS-v18_14_2.md b/v18/RESULTS-v18_14_2.md index 9cc7ab1d..4727c130 100644 --- a/v18/RESULTS-v18_14_2.md +++ b/v18/RESULTS-v18_14_2.md @@ -637,14 +637,14 @@ Fastest is streams.Writable writing 1e3 * "some data" |name|ops/sec|samples| |-|-|-| -|new Date().getTime()|8,010,207|94| -|Date.now()|15,802,914|93| +|new Date().getTime()|6,501,690|85| +|Date.now()|13,827,436|89|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 23:19:11 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:34 GMT+0000 (Coordinated Universal Time)
diff --git a/v18/RESULTS-v18_15_0.md b/v18/RESULTS-v18_15_0.md index 57394d19..d1977066 100644 --- a/v18/RESULTS-v18_15_0.md +++ b/v18/RESULTS-v18_15_0.md @@ -633,22 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Property access after shape transition +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Adding property after object creation - small object|1,860,465|84| -|Adding property in the object creation - small object|1,844,150|87| -|Adding property after the function creation - small class|105,948|79| -|Adding property in the function creation - small class|104,621|79| -|Adding property after the class creation - small class|86,080|76| -|Adding property in the class creation - small class|87,178|77| +|new Date().getTime()|7,230,692|94| +|Date.now()|15,366,187|97|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:42:41 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:26 GMT+0000 (Coordinated Universal Time)
diff --git a/v18/RESULTS-v18_16_0.md b/v18/RESULTS-v18_16_0.md index d6bc3466..54cfbc4f 100644 --- a/v18/RESULTS-v18_16_0.md +++ b/v18/RESULTS-v18_16_0.md @@ -633,18 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Date toISOString +## Getting unix time |name|ops/sec|samples| |-|-|-| -|new Date().toISOString()|1,331,909|87| -|fromUnixToISOString(new Date())|1,118,954|97| +|new Date().getTime()|7,350,286|97| +|Date.now()|14,984,975|91|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:10:30 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:32 GMT+0000 (Coordinated Universal Time)
diff --git a/v18/v18_0_0/unix-time.md b/v18/v18_0_0/unix-time.md index c8391d79..d01a5764 100644 --- a/v18/v18_0_0/unix-time.md +++ b/v18/v18_0_0/unix-time.md @@ -1,19 +1,15 @@ -## Property access after shape transition +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Adding property after object creation - small object|2,016,624|81| -|Adding property in the object creation - small object|2,211,681|89| -|Adding property after the function creation - small class|144,924|75| -|Adding property in the function creation - small class|147,009|75| -|Adding property after the class creation - small class|121,193|77| -|Adding property in the class creation - small class|113,712|73| +|new Date().getTime()|5,787,742|91| +|Date.now()|12,395,067|94|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:42:40 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:31 GMT+0000 (Coordinated Universal Time)
diff --git a/v18/v18_14_2/unix-time.md b/v18/v18_14_2/unix-time.md index c3d91921..611e8012 100644 --- a/v18/v18_14_2/unix-time.md +++ b/v18/v18_14_2/unix-time.md @@ -2,14 +2,14 @@ |name|ops/sec|samples| |-|-|-| -|new Date().getTime()|8,010,207|94| -|Date.now()|15,802,914|93| +|new Date().getTime()|6,501,690|85| +|Date.now()|13,827,436|89|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 23:19:11 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:34 GMT+0000 (Coordinated Universal Time)
diff --git a/v18/v18_15_0/unix-time.md b/v18/v18_15_0/unix-time.md index 403786d0..1a4e8c1d 100644 --- a/v18/v18_15_0/unix-time.md +++ b/v18/v18_15_0/unix-time.md @@ -1,19 +1,15 @@ -## Property access after shape transition +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Adding property after object creation - small object|1,860,465|84| -|Adding property in the object creation - small object|1,844,150|87| -|Adding property after the function creation - small class|105,948|79| -|Adding property in the function creation - small class|104,621|79| -|Adding property after the class creation - small class|86,080|76| -|Adding property in the class creation - small class|87,178|77| +|new Date().getTime()|7,230,692|94| +|Date.now()|15,366,187|97|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:42:41 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:26 GMT+0000 (Coordinated Universal Time)
diff --git a/v18/v18_16_0/unix-time.md b/v18/v18_16_0/unix-time.md index 6d785adb..d09a0d76 100644 --- a/v18/v18_16_0/unix-time.md +++ b/v18/v18_16_0/unix-time.md @@ -1,15 +1,15 @@ -## Date toISOString +## Getting unix time |name|ops/sec|samples| |-|-|-| -|new Date().toISOString()|1,331,909|87| -|fromUnixToISOString(new Date())|1,118,954|97| +|new Date().getTime()|7,350,286|97| +|Date.now()|14,984,975|91|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:10:30 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:32 GMT+0000 (Coordinated Universal Time)
diff --git a/v19/RESULTS-v19_0_0.md b/v19/RESULTS-v19_0_0.md index 14748c7f..1c73a9d3 100644 --- a/v19/RESULTS-v19_0_0.md +++ b/v19/RESULTS-v19_0_0.md @@ -633,20 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Parsing Integer +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Using parseInt(x, 10) - small number (2 len)|150,688,203|85| -|Using parseInt(x, 10) - big number (10 len)|12,414,600|89| -|Using + - small number (2 len)|736,226,076|85| -|Using + - big number (10 len)|758,545,198|86| +|new Date().getTime()|8,028,394|95| +|Date.now()|15,109,449|93|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:36:39 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:27 GMT+0000 (Coordinated Universal Time)
diff --git a/v19/RESULTS-v19_8_0.md b/v19/RESULTS-v19_8_0.md index 0565d139..5ffb6cea 100644 --- a/v19/RESULTS-v19_8_0.md +++ b/v19/RESULTS-v19_8_0.md @@ -612,19 +612,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Sorting Map +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Sort using default|160,333|94| -|Sort using first char|749,921|95| -|Sort using localeCompare|695,771|95| +|new Date().getTime()|9,079,049|90| +|Date.now()|16,047,153|97|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:55:31 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:29 GMT+0000 (Coordinated Universal Time)
diff --git a/v19/RESULTS-v19_8_1.md b/v19/RESULTS-v19_8_1.md index 989c65b3..4e160223 100644 --- a/v19/RESULTS-v19_8_1.md +++ b/v19/RESULTS-v19_8_1.md @@ -612,18 +612,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Possible undefined Function +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Using if to check function existence|820,334|74| -|Using ? operator to avoid rejection|831,588|75| +|new Date().getTime()|7,107,712|86| +|Date.now()|14,160,178|86|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:38:54 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:34 GMT+0000 (Coordinated Universal Time)
diff --git a/v19/RESULTS-v19_9_0.md b/v19/RESULTS-v19_9_0.md index 2f77aacc..ec949f95 100644 --- a/v19/RESULTS-v19_9_0.md +++ b/v19/RESULTS-v19_9_0.md @@ -633,22 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Private Property +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Raw usage private field|599,283,380|99| -|Raw usage underscore usage|597,207,510|99| -|Manipulating private properties using #|594,026,209|96| -|Manipulating private properties using underscore(_)|595,294,492|99| -|Manipulating private properties using Symbol|593,550,801|99| -|Manipulating private properties using PrivateSymbol|39,479,382|98| +|new Date().getTime()|8,738,388|89| +|Date.now()|15,585,953|96|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:40:51 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:28 GMT+0000 (Coordinated Universal Time)
diff --git a/v19/v19_0_0/unix-time.md b/v19/v19_0_0/unix-time.md index c305473a..8da86ecd 100644 --- a/v19/v19_0_0/unix-time.md +++ b/v19/v19_0_0/unix-time.md @@ -1,17 +1,15 @@ -## Parsing Integer +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Using parseInt(x, 10) - small number (2 len)|150,688,203|85| -|Using parseInt(x, 10) - big number (10 len)|12,414,600|89| -|Using + - small number (2 len)|736,226,076|85| -|Using + - big number (10 len)|758,545,198|86| +|new Date().getTime()|8,028,394|95| +|Date.now()|15,109,449|93|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:36:39 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:27 GMT+0000 (Coordinated Universal Time)
diff --git a/v19/v19_8_0/unix-time.md b/v19/v19_8_0/unix-time.md index 21d48996..268b7d07 100644 --- a/v19/v19_8_0/unix-time.md +++ b/v19/v19_8_0/unix-time.md @@ -1,16 +1,15 @@ -## Sorting Map +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Sort using default|160,333|94| -|Sort using first char|749,921|95| -|Sort using localeCompare|695,771|95| +|new Date().getTime()|9,079,049|90| +|Date.now()|16,047,153|97|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:55:31 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:29 GMT+0000 (Coordinated Universal Time)
diff --git a/v19/v19_8_1/unix-time.md b/v19/v19_8_1/unix-time.md index a961405e..cc3d1e89 100644 --- a/v19/v19_8_1/unix-time.md +++ b/v19/v19_8_1/unix-time.md @@ -1,15 +1,15 @@ -## Possible undefined Function +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Using if to check function existence|820,334|74| -|Using ? operator to avoid rejection|831,588|75| +|new Date().getTime()|7,107,712|86| +|Date.now()|14,160,178|86|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:38:54 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:34 GMT+0000 (Coordinated Universal Time)
diff --git a/v19/v19_9_0/unix-time.md b/v19/v19_9_0/unix-time.md index 98c98d24..d2bd18c8 100644 --- a/v19/v19_9_0/unix-time.md +++ b/v19/v19_9_0/unix-time.md @@ -1,19 +1,15 @@ -## Private Property +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Raw usage private field|599,283,380|99| -|Raw usage underscore usage|597,207,510|99| -|Manipulating private properties using #|594,026,209|96| -|Manipulating private properties using underscore(_)|595,294,492|99| -|Manipulating private properties using Symbol|593,550,801|99| -|Manipulating private properties using PrivateSymbol|39,479,382|98| +|new Date().getTime()|8,738,388|89| +|Date.now()|15,585,953|96|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:40:51 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:28 GMT+0000 (Coordinated Universal Time)
diff --git a/v20/RESULTS-v20_0_0.md b/v20/RESULTS-v20_0_0.md index 37632de2..953c269e 100644 --- a/v20/RESULTS-v20_0_0.md +++ b/v20/RESULTS-v20_0_0.md @@ -652,22 +652,18 @@ Fastest is streams.Writable writing 1e3 * "some data" -## Get the last item of an Array +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Length = 100 - Array.at|598,582,230|95| -|Length = 10_000 - Array.at|600,602,977|97| -|Length = 1_000_000 - Array.at|603,097,763|99| -|Length = 100 - Array[length - 1]|596,218,433|98| -|Length = 10_000 - Array[length - 1]|596,822,236|97| -|Length = 1_000_000 - Array[length - 1]|596,539,154|98| +|new Date().getTime()|7,282,776|92| +|Date.now()|14,308,152|94|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:26:53 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:33 GMT+0000 (Coordinated Universal Time)
diff --git a/v20/v20_0_0/unix-time.md b/v20/v20_0_0/unix-time.md index 6f7643c7..8baccaab 100644 --- a/v20/v20_0_0/unix-time.md +++ b/v20/v20_0_0/unix-time.md @@ -1,19 +1,15 @@ -## Get the last item of an Array +## Getting unix time |name|ops/sec|samples| |-|-|-| -|Length = 100 - Array.at|598,582,230|95| -|Length = 10_000 - Array.at|600,602,977|97| -|Length = 1_000_000 - Array.at|603,097,763|99| -|Length = 100 - Array[length - 1]|596,218,433|98| -|Length = 10_000 - Array[length - 1]|596,822,236|97| -|Length = 1_000_000 - Array[length - 1]|596,539,154|98| +|new Date().getTime()|7,282,776|92| +|Date.now()|14,308,152|94|
Environment * __Machine:__ linux x64 | 2 vCPUs | 6.8GB Mem -* __Run:__ Thu Sep 21 2023 22:26:53 GMT+0000 (Coordinated Universal Time) +* __Run:__ Tue Oct 03 2023 02:12:33 GMT+0000 (Coordinated Universal Time)