File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -71,3 +71,39 @@ defmodule MyApp.Blog.Post do
71
71
end
72
72
end
73
73
```
74
+
75
+ ## Benchamrks
76
+
77
+ Run benchmarks with
78
+
79
+ ```
80
+ MIX_ENV=bench mix run bench/filename.exs
81
+ ```
82
+
83
+ Where ` filename.exs ` is the name of one of the benchmark files in the ` bench ` directory.
84
+
85
+ ### Compared to ` Uniq.UUID ` :
86
+
87
+ #### String:
88
+
89
+ ```
90
+ Name ips average deviation median 99th %
91
+ uniq v7 string 2.23 M 448.71 ns ±3082.24% 417 ns 583 ns
92
+ uuid_v7 string 2.08 M 480.89 ns ±3868.08% 417 ns 625 ns
93
+
94
+ Comparison:
95
+ uniq v7 string 2.23 M
96
+ uuid_v7 string 2.08 M - 1.07x slower +32.18 ns
97
+ ```
98
+
99
+ #### Raw (binary):
100
+
101
+ ```
102
+ Name ips average deviation median 99th %
103
+ uniq v7 raw 3.35 M 298.15 ns ±7140.23% 250 ns 375 ns
104
+ uuid_v7 raw 2.71 M 368.53 ns ±4920.92% 333 ns 459 ns
105
+
106
+ Comparison:
107
+ uniq v7 raw 3.35 M
108
+ uuid_v7 raw 2.71 M - 1.24x slower +70.37 ns
109
+ ```
You can’t perform that action at this time.
0 commit comments