Crate uuid_simd

source ·
Expand description

SIMD-accelerated UUID operations.

Examples

use uuid::Uuid;
use uuid_simd::UuidExt;

let text = "67e55044-10b1-426f-9247-bb680e5fe0c8";
let uuid: Uuid = Uuid::parse(text.as_bytes()).unwrap();
println!("{}", uuid.format_simple())

Profile settings

To ensure maximum performance, the following profile settings are recommended when compiling this crate:

opt-level = 3
lto = "fat"
codegen-units = 1

CPU feature detection

The feature flag detect is enabled by default.

When the feature flag detect is enabled, the APIs will test at runtime whether the CPU (and OS) supports the required instruction set. The runtime detection will be skipped if the fastest implementation is already available at compile-time.

When the feature flag detect is disabled, the APIs will test at compile-time whether the compiler flags supports the required instruction set.

If the environment supports SIMD acceleration, the APIs will call SIMD functions under the hood. Otherwise, the APIs will call fallback functions.

When the feature flag unstable is enabled, this crate requires the nightly toolchain to compile.

no_std support

You can disable the default features to use this crate in a no_std environment.

You can enable the feature flag alloc if the environment supports heap allocation.

Currently the feature flag detect depends on the standard library. Dynamic CPU feature detection is not available in no_std environments.

Structs

UUID Error
A hyphenated UUID
Out reference (&'a out T).
Simpleuuid
A simple UUID

Enums

An enum type which represents the case of ascii letters.

Traits

Extension trait for converting a mutable reference to an out reference.
An extension trait for uuid::Uuid

Functions

Formats an UUID to a hyphenated UUID string.
Formats an UUID to a simple UUID string.
Parses an UUID from arbitrary bytes.
Parses a hyphenated UUID from arbitrary bytes.
Parses a simple UUID from arbitrary bytes.