Skip to content

Commit

Permalink
chore(unix-time.js): update benchmark results
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS authored and github-actions[bot] committed Oct 3, 2023
1 parent f90845c commit 465f74a
Show file tree
Hide file tree
Showing 30 changed files with 118 additions and 191 deletions.
17 changes: 4 additions & 13 deletions RESULTS-v16.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,27 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

8 changes: 4 additions & 4 deletions RESULTS-v18.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

12 changes: 4 additions & 8 deletions RESULTS-v19.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,22 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

12 changes: 4 additions & 8 deletions RESULTS-v20.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,22 +652,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

8 changes: 4 additions & 4 deletions v16/RESULTS-v16_0_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -619,18 +619,18 @@ new Array(length)|100,000,000|4,508.701ms
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

8 changes: 4 additions & 4 deletions v16/RESULTS-v16_18_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

8 changes: 4 additions & 4 deletions v16/RESULTS-v16_19_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

17 changes: 4 additions & 13 deletions v16/RESULTS-v16_20_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,27 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

8 changes: 4 additions & 4 deletions v16/v16_0_0/unix-time.md
Original file line number Diff line number Diff line change
@@ -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|


<details>
<summary>Environment</summary>

* __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)
</details>

8 changes: 4 additions & 4 deletions v16/v16_18_1/unix-time.md
Original file line number Diff line number Diff line change
@@ -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|


<details>
<summary>Environment</summary>

* __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)
</details>

8 changes: 4 additions & 4 deletions v16/v16_19_0/unix-time.md
Original file line number Diff line number Diff line change
@@ -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|


<details>
<summary>Environment</summary>

* __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)
</details>

17 changes: 4 additions & 13 deletions v16/v16_20_0/unix-time.md
Original file line number Diff line number Diff line change
@@ -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|


<details>
<summary>Environment</summary>

* __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)
</details>

12 changes: 4 additions & 8 deletions v18/RESULTS-v18_0_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,22 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

6 changes: 3 additions & 3 deletions v18/RESULTS-v18_14_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|


<details>
<summary>Environment</summary>

* __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)
</details>

12 changes: 4 additions & 8 deletions v18/RESULTS-v18_15_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,22 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

8 changes: 4 additions & 4 deletions v18/RESULTS-v18_16_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,18 @@ Fastest is streams.Writable writing 1e3 * "some data"
</details>


## 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|


<details>
<summary>Environment</summary>

* __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)
</details>

Loading

0 comments on commit 465f74a

Please sign in to comment.