You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 2025-04-13 | 0 | arktype | 2 | 147 KB |_0_|**1**|_0_|**1**| 873 ms _-1_| 691 ms _-1_|_0_|**1**|
40
+
| 2025-04-13 | 7 | valibot |**0**| 5 KB |**1**|**1**|**1**|**1**| 68 ms **1**| 11 ms **1**|**1**|_0_|
41
+
| 2025-04-13 | 7 | zod v3 |**0**| 60 KB |_0_|**1**|**1**|**1**| 101 ms **1**| 35 ms **1**|**1**|**1**|
42
+
| 2025-04-13 | 4 | zod v4 | 1 | 49 KB |_0_|**1**|**1**|**1**| 222 ms _0_| 144 ms _0_|_0_|**1**|
43
+
| 2025-04-13 | 4 |@zod/mini| 1 | 21 KB |**1**|**1**|**1**|**1**| 243 ms _0_| 168 ms _0_|_0_|**1**|
44
44
45
45
Legend :
46
46
47
47
- Deps : the number of dependencies of the library
48
48
- Size : the minified build size in bytes of the related file in `src`, run `bun run build` to see by yourself
49
-
- Light : 1 point if the build is less than 10 KB
49
+
- Light : 1 point if the build is `<= 20 KB`
50
50
- Input : 1 point if the library can see that `age` is optional in the input but not optional in `type User` the output type
51
51
- Throw : 1 point if the library have a parse or throw method, useful when we don't want to handle the error cases
52
52
- Safe : 1 point if the library have a safe parse method that will not throw and usually return a `Result` type
53
-
- Script exec : 1 point if the average time in milliseconds to execute the test file with bun is under `100ms`, check the `bun run bench` command output
54
-
- Lib exec : 1 point if the average time in milliseconds to execute the library is under `30ms`, check the `bun run check:once` command output
53
+
- Script exec : 1 point if the average time in ms to execute the test file with bun is `<= 100ms`, check the `bun run bench` command output
54
+
- Lib exec : 1 point if the average time in ms to execute the library is `<= 35ms`, check the `bun run check:once` command output
55
55
- Fast : 1 point if the library execution time is less than 100 ms
56
56
- Readability : 1 point if the library is easy to write & read, the syntax need to be intuitive
57
57
58
+
Test have been run on :
59
+
60
+
- Windows 11 x64
61
+
- AMD Ryzen 7 7800X3D, 64GB of RAM
62
+
- Bun v1.2.4
63
+
58
64
## My favorite pick
59
65
60
66
Zod is my favorite pick because it's fast and provide a better readability.
61
67
62
68
Ok the build size is bigger but it does not impact the performance that much.
63
69
64
-
The 34ms vs 10ms seems like a 3x difference but it's the time to run 1000 iterations. So in the end it's not that much of a difference in a real world scenario.
70
+
The 35ms vs 11ms seems like a 3x difference but it's the time to run 1000 iterations. So in the end it's not that much of a difference in a real world scenario.
65
71
66
72
For some weird reason zod4 seems to be slower than zod3
67
73
@@ -71,7 +77,7 @@ For some weird reason zod4 seems to be slower than zod3
0 commit comments