GitShow/BurntSushi/duration-unit-lookup
BurntSushi

duration-unit-lookup

How fast can we recognize a word from a small pre-determined set?

by BurntSushi
Star on GitHubFork

Rust

86 stars4 forks1 contributorQuiet · 1y agoSince 2024Unlicense

Meet the team

See all 1 on GitHub →
BurntSushi
BurntSushi5 contributions

Languages

View on GitHub →
Rust91.5%
C8.5%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 1 in progress · Last activity 1y ago
See all on GitHub →
raphlinus
AVX-512 lookup experimentOpenPR

This commit contains an experiment in using AVX-512 SIMD intrinsics to do the lookup. Because AVX-512 is not stable, it must be run with nightly. In addition, it must be run with target-cpu=native on a CPU with AVX-512. The central technique is a perfect hash, but not minimal. The hash generates unique values for each of the keys, in a 128-entry lookup table. An important technique is the masked load, to ensure no values past the end of the slice are loaded. In spite of all this, it's 1.15 - 1.5x slower than the big prefix match on my Zen 5 (AMD HX 370) machine. Because the code is basically branchless, it may perform better on less predictable workloads.

raphlinus · 1y ago
Structured data for AI agents

Repository: BurntSushi/duration-unit-lookup. Description: How fast can we recognize a word from a small pre-determined set? Stars: 86, Forks: 4. Primary language: Rust. Languages: Rust (91.5%), C (8.5%). License: Unlicense. Open PRs: 1, open issues: 0. Last activity: 1y ago. Community health: 42%. Top contributors: BurntSushi.

·@ofershap

Replace github.com with gitshow.dev