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

Update benchmarks #62

Merged
merged 2 commits into from
Jul 2, 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
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,18 @@ UUID('ffe95fcc-b818-4aca-a350-e0a35b9de6ec')

## Benchmarks

| Benchmark | Min | Max | Mean | Min (+) | Max (+) | Mean (+) |
| ---------------- | ----- | ----- | ----- | ------------- | ------------- | ------------- |
| UUID v1 | 0.058 | 0.059 | 0.058 | 0.005 (12.0x) | 0.005 (11.9x) | 0.005 (12.0x) |
| UUID v3 | 0.063 | 0.064 | 0.063 | 0.008 (7.9x) | 0.008 (8.1x) | 0.008 (8.0x) |
| UUID v4 | 0.041 | 0.041 | 0.041 | 0.004 (11.1x) | 0.004 (10.8x) | 0.004 (10.9x) |
| UUID v5 | 0.064 | 0.066 | 0.065 | 0.008 (8.1x) | 0.008 (8.1x) | 0.008 (8.1x) |
| UUID from hex | 0.024 | 0.025 | 0.024 | 0.004 (6.7x) | 0.004 (6.6x) | 0.004 (6.6x) |
| UUID from bytes | 0.024 | 0.025 | 0.024 | 0.004 (6.7x) | 0.004 (6.6x) | 0.004 (6.7x) |
| UUID from int | 0.024 | 0.025 | 0.024 | 0.004 (6.6x) | 0.004 (6.7x) | 0.004 (6.6x) |
| UUID from fields | 0.028 | 0.028 | 0.028 | 0.009 (3.1x) | 0.009 (3.1x) | 0.009 (3.1x) |
| Benchmark | Min | Max | Mean | Min (+) | Max (+) | Mean (+) |
|------------------|---------|---------|---------|-----------------|-----------------|-----------------|
| UUID v1 | 0.061 | 0.299 | 0.194 | 0.019 (3.3x) | 0.019 (15.4x) | 0.019 (10.1x) |
| UUID v3 | 0.267 | 0.307 | 0.293 | 0.035 (7.6x) | 0.041 (7.5x) | 0.039 (7.5x) |
| UUID v4 | 0.145 | 0.301 | 0.249 | 0.004 (38.5x) | 0.005 (54.8x) | 0.005 (53.0x) |
| UUID v5 | 0.058 | 0.189 | 0.146 | 0.008 (7.6x) | 0.038 (5.0x) | 0.016 (9.0x) |
| UUID from hex | 0.128 | 0.139 | 0.135 | 0.016 (8.2x) | 0.017 (8.0x) | 0.016 (8.3x) |
| UUID from bytes | 0.031 | 0.135 | 0.093 | 0.016 (2.0x) | 0.016 (8.6x) | 0.016 (5.9x) |
| UUID from int | 0.027 | 0.102 | 0.043 | 0.003 (8.3x) | 0.004 (25.0x) | 0.003 (12.4x) |
| UUID from fields | 0.031 | 0.162 | 0.077 | 0.005 (6.0x) | 0.005 (30.6x) | 0.005 (14.7x) |

<sup>Benchmark results might vary in different environments, but in most cases the uuid_utils should outperform stdlib uuid.</sup><br>

## How to develop locally

Expand Down
22 changes: 12 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,18 @@ UUID('ffe95fcc-b818-4aca-a350-e0a35b9de6ec')

## Benchmarks

| Benchmark | Min | Max | Mean | Min (+) | Max (+) | Mean (+) |
| ---------------- | ----- | ----- | ----- | ------------- | ------------- | ------------- |
| UUID v1 | 0.058 | 0.059 | 0.058 | 0.005 (12.0x) | 0.005 (11.9x) | 0.005 (12.0x) |
| UUID v3 | 0.063 | 0.064 | 0.063 | 0.008 (7.9x) | 0.008 (8.1x) | 0.008 (8.0x) |
| UUID v4 | 0.041 | 0.041 | 0.041 | 0.004 (11.1x) | 0.004 (10.8x) | 0.004 (10.9x) |
| UUID v5 | 0.064 | 0.066 | 0.065 | 0.008 (8.1x) | 0.008 (8.1x) | 0.008 (8.1x) |
| UUID from hex | 0.024 | 0.025 | 0.024 | 0.004 (6.7x) | 0.004 (6.6x) | 0.004 (6.6x) |
| UUID from bytes | 0.024 | 0.025 | 0.024 | 0.004 (6.7x) | 0.004 (6.6x) | 0.004 (6.7x) |
| UUID from int | 0.024 | 0.025 | 0.024 | 0.004 (6.6x) | 0.004 (6.7x) | 0.004 (6.6x) |
| UUID from fields | 0.028 | 0.028 | 0.028 | 0.009 (3.1x) | 0.009 (3.1x) | 0.009 (3.1x) |
| Benchmark | Min | Max | Mean | Min (+) | Max (+) | Mean (+) |
|------------------|---------|---------|---------|-----------------|-----------------|-----------------|
| UUID v1 | 0.061 | 0.299 | 0.194 | 0.019 (3.3x) | 0.019 (15.4x) | 0.019 (10.1x) |
| UUID v3 | 0.267 | 0.307 | 0.293 | 0.035 (7.6x) | 0.041 (7.5x) | 0.039 (7.5x) |
| UUID v4 | 0.145 | 0.301 | 0.249 | 0.004 (38.5x) | 0.005 (54.8x) | 0.005 (53.0x) |
| UUID v5 | 0.058 | 0.189 | 0.146 | 0.008 (7.6x) | 0.038 (5.0x) | 0.016 (9.0x) |
| UUID from hex | 0.128 | 0.139 | 0.135 | 0.016 (8.2x) | 0.017 (8.0x) | 0.016 (8.3x) |
| UUID from bytes | 0.031 | 0.135 | 0.093 | 0.016 (2.0x) | 0.016 (8.6x) | 0.016 (5.9x) |
| UUID from int | 0.027 | 0.102 | 0.043 | 0.003 (8.3x) | 0.004 (25.0x) | 0.003 (12.4x) |
| UUID from fields | 0.031 | 0.162 | 0.077 | 0.005 (6.0x) | 0.005 (30.6x) | 0.005 (14.7x) |

<sup>Benchmark results might vary in different environments, but in most cases the uuid_utils should outperform stdlib uuid.</sup><br>

## How to develop locally

Expand Down
Loading