Skip to content

Commit ca2ca40

Browse files
committed
🎉 feat: avoid closure reference
1 parent 15f6a43 commit ca2ca40

File tree

5 files changed

+117
-128
lines changed

5 files changed

+117
-128
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.1.4 - 27 Mar 2025
2+
Improvement:
3+
- Improve array performance by avoiding unnecessary closure reference
4+
15
# 0.1.3 - 14 Mar 2025
26
Bug fix:
37
- support `t.Module`, `t.Ref`

benchmarks/array.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { t } from 'elysia'
2+
import { benchmark } from './utils'
3+
4+
benchmark(
5+
t.Object({
6+
ids: t.Array(t.Number()),
7+
names: t.Array(t.String()),
8+
games: t.Array(
9+
t.Object({
10+
name: t.String(),
11+
tags: t.Array(t.String())
12+
})
13+
)
14+
}),
15+
{
16+
ids: [1, 2, 3],
17+
names: ['SaltyAom', 'SaltyAom', 'SaltyAom'],
18+
games: [
19+
{
20+
name: 'MiSide',
21+
tags: ['Psychological Horror', 'Cute', 'Dating Sim']
22+
},
23+
{
24+
name: 'Strinova',
25+
tags: ['Free to Play', 'Anime', 'Third-Person Shooter']
26+
},
27+
{
28+
name: "Tom Clancy's Rainbow Six Siege",
29+
tags: ['FPS', 'Multiplayer', 'Tactical']
30+
}
31+
]
32+
}
33+
)

0 commit comments

Comments
 (0)