Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: OpaqueReference #42

Merged
merged 10 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
run_install: |
- args: [--frozen-lockfile]
run_install: true

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache: "pnpm"

- name: Clean
run: pnpm recursive run clean
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</head>
<body>
<div class="container">
<canvas id="chart1696923403285" width="16" height="9"></canvas>
<canvas id="chart1720807288570" width="16" height="9"></canvas>
</div>
<script>
const format = (num) => {
Expand All @@ -51,18 +51,18 @@
chunked.map((chunk) => chunk.join('')).join(' ') + fractionStr
)
}
const ctx1696923403285 = document
.getElementById('chart1696923403285')
const ctx1720807288570 = document
.getElementById('chart1720807288570')
.getContext('2d')
const chart1696923403285 = new Chart(ctx1696923403285, {
const chart1720807288570 = new Chart(ctx1720807288570, {
type: 'bar',
data: {
labels: ["devalue","flatted","JSON","next-json","o-son","serialize-javascript","seroval","superjson","tosource","warp10"],
datasets: [
{
data: [861,684,3461,562,1008,1731,999,387,919,2221],
backgroundColor: ["hsl(29.855999999999995, 85%, 55%)","hsl(23.712000000000007, 85%, 55%)","hsl(120, 85%, 55%)","hsl(19.487999999999996, 85%, 55%)","hsl(34.94400000000001, 85%, 55%)","hsl(60.012, 85%, 55%)","hsl(34.632, 85%, 55%)","hsl(13.416000000000007, 85%, 55%)","hsl(31.859999999999996, 85%, 55%)","hsl(77.004, 85%, 55%)"],
borderColor: ["hsl(29.855999999999995, 85%, 55%)","hsl(23.712000000000007, 85%, 55%)","hsl(120, 85%, 55%)","hsl(19.487999999999996, 85%, 55%)","hsl(34.94400000000001, 85%, 55%)","hsl(60.012, 85%, 55%)","hsl(34.632, 85%, 55%)","hsl(13.416000000000007, 85%, 55%)","hsl(31.859999999999996, 85%, 55%)","hsl(77.004, 85%, 55%)"],
data: [848,672,3426,555,1013,1727,1055,532,926,2452],
backgroundColor: ["hsl(29.7, 85%, 55%)","hsl(23.532, 85%, 55%)","hsl(120, 85%, 55%)","hsl(19.440000000000005, 85%, 55%)","hsl(35.48399999999999, 85%, 55%)","hsl(60.492, 85%, 55%)","hsl(36.94800000000001, 85%, 55%)","hsl(18.636000000000003, 85%, 55%)","hsl(32.436, 85%, 55%)","hsl(85.88399999999999, 85%, 55%)"],
borderColor: ["hsl(29.7, 85%, 55%)","hsl(23.532, 85%, 55%)","hsl(120, 85%, 55%)","hsl(19.440000000000005, 85%, 55%)","hsl(35.48399999999999, 85%, 55%)","hsl(60.492, 85%, 55%)","hsl(36.94800000000001, 85%, 55%)","hsl(18.636000000000003, 85%, 55%)","hsl(32.436, 85%, 55%)","hsl(85.88399999999999, 85%, 55%)"],
borderWidth: 2,
},
],
Expand Down
14 changes: 7 additions & 7 deletions benchmark/results/charts/simple-object to string.chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</head>
<body>
<div class="container">
<canvas id="chart1697370088414" width="16" height="9"></canvas>
<canvas id="chart1720807222374" width="16" height="9"></canvas>
</div>
<script>
const format = (num) => {
Expand All @@ -51,18 +51,18 @@
chunked.map((chunk) => chunk.join('')).join(' ') + fractionStr
)
}
const ctx1697370088414 = document
.getElementById('chart1697370088414')
const ctx1720807222374 = document
.getElementById('chart1720807222374')
.getContext('2d')
const chart1697370088414 = new Chart(ctx1697370088414, {
const chart1720807222374 = new Chart(ctx1720807222374, {
type: 'bar',
data: {
labels: ["devalue","flatted","next-json","o-son","seroval","superjson","warp10"],
datasets: [
{
data: [1973272,2828602,2040565,2362845,3363944,1267477,5124423],
backgroundColor: ["hsl(46.212, 85%, 55%)","hsl(66.24000000000001, 85%, 55%)","hsl(47.784, 85%, 55%)","hsl(55.332, 85%, 55%)","hsl(78.78000000000002, 85%, 55%)","hsl(29.676000000000005, 85%, 55%)","hsl(120, 85%, 55%)"],
borderColor: ["hsl(46.212, 85%, 55%)","hsl(66.24000000000001, 85%, 55%)","hsl(47.784, 85%, 55%)","hsl(55.332, 85%, 55%)","hsl(78.78000000000002, 85%, 55%)","hsl(29.676000000000005, 85%, 55%)","hsl(120, 85%, 55%)"],
data: [1972946,2884592,2086048,2524547,3480722,1376390,5279707],
backgroundColor: ["hsl(44.843999999999994, 85%, 55%)","hsl(65.568, 85%, 55%)","hsl(47.412, 85%, 55%)","hsl(57.384, 85%, 55%)","hsl(79.11600000000001, 85%, 55%)","hsl(31.283999999999992, 85%, 55%)","hsl(120, 85%, 55%)"],
borderColor: ["hsl(44.843999999999994, 85%, 55%)","hsl(65.568, 85%, 55%)","hsl(47.412, 85%, 55%)","hsl(57.384, 85%, 55%)","hsl(79.11600000000001, 85%, 55%)","hsl(31.283999999999992, 85%, 55%)","hsl(120, 85%, 55%)"],
borderWidth: 2,
},
],
Expand Down
14 changes: 7 additions & 7 deletions benchmark/results/charts/small-collection to string.chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</head>
<body>
<div class="container">
<canvas id="chart1697370173574" width="16" height="9"></canvas>
<canvas id="chart1720807150515" width="16" height="9"></canvas>
</div>
<script>
const format = (num) => {
Expand All @@ -51,18 +51,18 @@
chunked.map((chunk) => chunk.join('')).join(' ') + fractionStr
)
}
const ctx1697370173574 = document
.getElementById('chart1697370173574')
const ctx1720807150515 = document
.getElementById('chart1720807150515')
.getContext('2d')
const chart1697370173574 = new Chart(ctx1697370173574, {
const chart1720807150515 = new Chart(ctx1720807150515, {
type: 'bar',
data: {
labels: ["devalue","flatted","JSON","next-json","o-son","serialize-javascript","seroval","superjson","tosource","warp10"],
datasets: [
{
data: [264511,163913,931649,238159,302214,463702,339857,123960,321329,683172],
backgroundColor: ["hsl(34.068, 85%, 55%)","hsl(21.108000000000004, 85%, 55%)","hsl(120, 85%, 55%)","hsl(30.672000000000004, 85%, 55%)","hsl(38.928, 85%, 55%)","hsl(59.724000000000004, 85%, 55%)","hsl(43.775999999999996, 85%, 55%)","hsl(15.972000000000003, 85%, 55%)","hsl(41.38799999999999, 85%, 55%)","hsl(87.996, 85%, 55%)"],
borderColor: ["hsl(34.068, 85%, 55%)","hsl(21.108000000000004, 85%, 55%)","hsl(120, 85%, 55%)","hsl(30.672000000000004, 85%, 55%)","hsl(38.928, 85%, 55%)","hsl(59.724000000000004, 85%, 55%)","hsl(43.775999999999996, 85%, 55%)","hsl(15.972000000000003, 85%, 55%)","hsl(41.38799999999999, 85%, 55%)","hsl(87.996, 85%, 55%)"],
data: [265744,163973,922310,234980,304793,464675,353512,155598,322059,677254],
backgroundColor: ["hsl(34.572, 85%, 55%)","hsl(21.336000000000002, 85%, 55%)","hsl(120, 85%, 55%)","hsl(30.576000000000004, 85%, 55%)","hsl(39.66, 85%, 55%)","hsl(60.456, 85%, 55%)","hsl(45.995999999999995, 85%, 55%)","hsl(20.244000000000007, 85%, 55%)","hsl(41.904, 85%, 55%)","hsl(88.11600000000001, 85%, 55%)"],
borderColor: ["hsl(34.572, 85%, 55%)","hsl(21.336000000000002, 85%, 55%)","hsl(120, 85%, 55%)","hsl(30.576000000000004, 85%, 55%)","hsl(39.66, 85%, 55%)","hsl(60.456, 85%, 55%)","hsl(45.995999999999995, 85%, 55%)","hsl(20.244000000000007, 85%, 55%)","hsl(41.904, 85%, 55%)","hsl(88.11600000000001, 85%, 55%)"],
borderWidth: 2,
},
],
Expand Down
20 changes: 10 additions & 10 deletions benchmark/results/csv/large-simple-collection to string.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"name","ops","margin","percentSlower"
"devalue",861,0.1,75.12
"flatted",684,0.16,80.24
"JSON",3461,0.09,0
"next-json",562,0.82,83.76
"o-son",1008,0.09,70.88
"serialize-javascript",1731,0.12,49.99
"seroval",999,0.08,71.14
"superjson",387,0.1,88.82
"tosource",919,0.13,73.45
"warp10",2221,0.07,35.83
"devalue",848,1.18,75.25
"flatted",672,1.9,80.39
"JSON",3426,0.58,0
"next-json",555,1.6,83.8
"o-son",1013,0.13,70.43
"serialize-javascript",1727,0.31,49.59
"seroval",1055,0.06,69.21
"superjson",532,0.39,84.47
"tosource",926,0.21,72.97
"warp10",2452,0.27,28.43
14 changes: 7 additions & 7 deletions benchmark/results/csv/simple-object to string.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"name","ops","margin","percentSlower"
"devalue",1973272,0.55,61.49
"flatted",2828602,1.4,44.8
"next-json",2040565,1.6,60.18
"o-son",2362845,1.74,53.89
"seroval",3363944,0.93,34.35
"superjson",1267477,1.08,75.27
"warp10",5124423,0.63,0
"devalue",1972946,0.4,62.63
"flatted",2884592,0.21,45.36
"next-json",2086048,0.27,60.49
"o-son",2524547,0.14,52.18
"seroval",3480722,0.34,34.07
"superjson",1376390,0.41,73.93
"warp10",5279707,0.73,0
20 changes: 10 additions & 10 deletions benchmark/results/csv/small-collection to string.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"name","ops","margin","percentSlower"
"devalue",264511,0.71,71.61
"flatted",163913,0.35,82.41
"JSON",931649,0.17,0
"next-json",238159,0.76,74.44
"o-son",302214,0.25,67.56
"serialize-javascript",463702,0.28,50.23
"seroval",339857,0.15,63.52
"superjson",123960,0.16,86.69
"tosource",321329,0.33,65.51
"warp10",683172,1.13,26.67
"devalue",265744,0.35,71.19
"flatted",163973,0.29,82.22
"JSON",922310,0.11,0
"next-json",234980,2.25,74.52
"o-son",304793,0.22,66.95
"serialize-javascript",464675,0.44,49.62
"seroval",353512,2.02,61.67
"superjson",155598,0.07,83.13
"tosource",322059,0.32,65.08
"warp10",677254,0.35,26.57
60 changes: 30 additions & 30 deletions benchmark/results/json/large-simple-collection to string.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
{
"name": "large-simple-collection to string",
"date": "2023-10-10T07:36:43.285Z",
"date": "2024-07-12T18:01:28.570Z",
"version": null,
"results": [
{
"name": "devalue",
"ops": 861,
"margin": 0.1,
"percentSlower": 75.12
"ops": 848,
"margin": 1.18,
"percentSlower": 75.25
},
{
"name": "flatted",
"ops": 684,
"margin": 0.16,
"percentSlower": 80.24
"ops": 672,
"margin": 1.9,
"percentSlower": 80.39
},
{
"name": "JSON",
"ops": 3461,
"margin": 0.09,
"ops": 3426,
"margin": 0.58,
"percentSlower": 0
},
{
"name": "next-json",
"ops": 562,
"margin": 0.82,
"percentSlower": 83.76
"ops": 555,
"margin": 1.6,
"percentSlower": 83.8
},
{
"name": "o-son",
"ops": 1008,
"margin": 0.09,
"percentSlower": 70.88
"ops": 1013,
"margin": 0.13,
"percentSlower": 70.43
},
{
"name": "serialize-javascript",
"ops": 1731,
"margin": 0.12,
"percentSlower": 49.99
"ops": 1727,
"margin": 0.31,
"percentSlower": 49.59
},
{
"name": "seroval",
"ops": 999,
"margin": 0.08,
"percentSlower": 71.14
"ops": 1055,
"margin": 0.06,
"percentSlower": 69.21
},
{
"name": "superjson",
"ops": 387,
"margin": 0.1,
"percentSlower": 88.82
"ops": 532,
"margin": 0.39,
"percentSlower": 84.47
},
{
"name": "tosource",
"ops": 919,
"margin": 0.13,
"percentSlower": 73.45
"ops": 926,
"margin": 0.21,
"percentSlower": 72.97
},
{
"name": "warp10",
"ops": 2221,
"margin": 0.07,
"percentSlower": 35.83
"ops": 2452,
"margin": 0.27,
"percentSlower": 28.43
}
],
"fastest": {
Expand Down
42 changes: 21 additions & 21 deletions benchmark/results/json/simple-object to string.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
{
"name": "simple-object to string",
"date": "2023-10-15T11:41:28.414Z",
"date": "2024-07-12T18:00:22.374Z",
"version": null,
"results": [
{
"name": "devalue",
"ops": 1973272,
"margin": 0.55,
"percentSlower": 61.49
"ops": 1972946,
"margin": 0.4,
"percentSlower": 62.63
},
{
"name": "flatted",
"ops": 2828602,
"margin": 1.4,
"percentSlower": 44.8
"ops": 2884592,
"margin": 0.21,
"percentSlower": 45.36
},
{
"name": "next-json",
"ops": 2040565,
"margin": 1.6,
"percentSlower": 60.18
"ops": 2086048,
"margin": 0.27,
"percentSlower": 60.49
},
{
"name": "o-son",
"ops": 2362845,
"margin": 1.74,
"percentSlower": 53.89
"ops": 2524547,
"margin": 0.14,
"percentSlower": 52.18
},
{
"name": "seroval",
"ops": 3363944,
"margin": 0.93,
"percentSlower": 34.35
"ops": 3480722,
"margin": 0.34,
"percentSlower": 34.07
},
{
"name": "superjson",
"ops": 1267477,
"margin": 1.08,
"percentSlower": 75.27
"ops": 1376390,
"margin": 0.41,
"percentSlower": 73.93
},
{
"name": "warp10",
"ops": 5124423,
"margin": 0.63,
"ops": 5279707,
"margin": 0.73,
"percentSlower": 0
}
],
Expand Down
Loading