| Crates.io | email_syntax_verify_opt |
| lib.rs | email_syntax_verify_opt |
| version | 0.1.0 |
| created_at | 2025-07-21 19:40:59.002699+00 |
| updated_at | 2025-07-21 19:40:59.002699+00 |
| description | Ultra-fast, zero-allocation email validation library optimized for enterprise production use |
| homepage | https://github.com/hun756/email_syntax_verify_opt |
| repository | https://github.com/hun756/email_syntax_verify_opt |
| max_upload_size | |
| id | 1762527 |
| size | 50,058 |
Ultra-fast, zero-allocation email validation library optimized for enterprise production use.
Benchmarks performed on AMD Ryzen 7 7800X3D (8-core) processor:
| Test Case | Our Validator | Validator Crate | Regex | Performance Gain |
|---|---|---|---|---|
| Valid Emails (15 items) | 310.94 ns |
2.0242 Β΅s |
585.92 ns |
6.5x faster |
| Invalid Emails (16 items) | 164.85 ns |
5.1443 Β΅s |
363.16 ns |
31x faster |
| Realistic Emails (10 items) | 242.67 ns |
1.4587 Β΅s |
435.53 ns |
6x faster |
| Single Email | 17.509 ns |
132.44 ns |
41.271 ns |
7.5x faster |
| Email Length | Our Validator | Validator Crate | Performance Gain |
|---|---|---|---|
Short (a@b.co) |
8.8229 ns |
99.775 ns |
11x faster |
Medium (user.name@example.com) |
16.487 ns |
135.29 ns |
8x faster |
| Long (67 chars) | 46.331 ns |
207.98 ns |
4.5x faster |
This library achieves exceptional performance through:
#[cold] annotationsuse email_syntax_verify_opt::{validate_email, ValidateEmail};
// Direct function call
assert!(validate_email("test@example.com"));
// Trait usage
assert!("user@domain.co.uk".validate_email());
assert!("invalid.email".validate_email() == false);
// Byte slice validation
let email_bytes = b"test@example.com";
assert!(email_bytes.validate_email());
// String validation
let email_string = String::from("user@example.org");
assert!(email_string.validate_email());
# Run all benchmarks
cargo bench
# Run specific benchmark
cargo bench -- "single_email_comparison"
# Generate HTML reports
cargo bench -- --output-format html
Perfect for high-performance applications requiring:
All benchmarks use Criterion.rs with:
MIT