Skip to content

Commit 93086f2

Browse files
Update readme
1 parent cdb23e1 commit 93086f2

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,39 @@ defmodule MyApp.Blog.Post do
7171
end
7272
end
7373
```
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+
```

0 commit comments

Comments
 (0)