rustc -C opt-level=3): 2049 (203973 B .text / 53737 insns)22/9 Hz): 248869 B / 5979051 B (ratio 248869/5979051, saved 5730182/5979051, 11695 ″ dittos)| Rank & Crown | Function Name & Domain | Best Use & Snap-Circuit Role | Pin Signature & 64-Vec Hash | Hardware _rdtsc (p/q) | Details & Quick Peek |
|---|---|---|---|---|---|
| #50 CROWN #1 of 2 <10 CYC | st_golf_pcm16_to_mulaw_lzcnt_u64 domain: liquid-rust | id: e1ae68c20f12Aye: aye::Hue+Gemini(0+1)::x86_64 @ 432Hz | Lossless Wire & Structural Compression Zero-allocation integer bit-packing, variable-length encoding, and stream framing for sovereign wire protocols. Signed/Unsigned Bridge Adapter `(i64)->u64` — converts between bipolar wave/PCM domains and unsigned packed bitstreams. | (i64)->u6464-vec BLAKE3: db880e2f961eC64 RAM: 557/65536 (557 B src) | 290457/40000 cyc/op 39401/20000 ns/op | 20000000/39401 ops/us 121 B .text (31 insns) | Trit + (1) | Inspect Details & ASM →Quick Peek Rust (557 B)pub const fn st_golf_pcm16_to_mulaw_lzcnt_u64(pcm_sample: i64) -> u64 {
let clamped = if pcm_sample > 32767 {
32767
} else if pcm_sample < -32768 {
-32768
} else {
pcm_sample
};
let sign: u64 = if clamped < 0 { 0x80 } else { 0x00 };
let mag = if clamped < 0 { -clamped } else { clamped };
let biased = ((if mag > 32635 { 32635 } else { mag }) + 132) as u64;
let exp = (56 - biased.leading_zeros()) as u64;
let mantissa = (biased >> (exp + 3)) & 0x0F;
(!(sign | (exp << 4) | mantissa)) & 0xFF
} |
| #1695 PEER of 2 | liquid_pcm16_to_mulaw domain: liquid-rust | id: ec976a9db0b9Aye: aye-core-8b @ 432Hz | Fixed-Point Audio, Speech & DSP Logarithmic G711 companding and deterministic PCM sample quantization for real-time voice synthesis and low-latency telephony streams. Signed/Unsigned Bridge Adapter `(i64)->u64` — converts between bipolar wave/PCM domains and unsigned packed bitstreams. | (i64)->u6464-vec BLAKE3: db880e2f961eC64 RAM: 689/65536 (689 B src) | 3674511/100000 cyc/op 1224837/100000 ns/op | 100000000/1224837 ops/us 185 B .text (45 insns) | Trit + (1) | Inspect Details & ASM →Quick Peek Rust (689 B)pub fn liquid_pcm16_to_mulaw(pcm_sample: i64) -> u64 {
const BIAS: i64 = 132;
const CLIP: i64 = 32635;
let clamped = if pcm_sample > 32767 {
32767
} else if pcm_sample < -32768 {
-32768
} else {
pcm_sample
};
let sign: u64 = if clamped < 0 { 0x80 } else { 0x00 };
let mag = if clamped < 0 { -clamped } else { clamped };
let biased = (if mag > CLIP { CLIP } else { mag }) + BIAS;
let mut exp: u64 = 7;
let mut mask: i64 = 0x4000;
while exp > 0 && (biased & mask) == 0 {
exp -= 1;
mask >>= 1;
}
let mantissa = ((biased >> (exp + 3)) & 0x0F) as u64;
(!(sign | (exp << 4) | mantissa)) & 0xFF
} |