reddb-io-server 1.46.3

RedDB server-side engine: storage, runtime, replication, MCP, AI, and the gRPC/HTTP/RedWire/PG-wire dispatchers. Re-exported by the umbrella `reddb` crate.
Documentation
//! Time just the two candidate key representations, excluding field lookup and hashing.
use reddb_engine::query::runtime::values::runtime_value_text;
use reddb_types::Value;
use std::{hint::black_box, time::Instant};

fn main() {
    let rows: Vec<_> = (0..4096)
        .map(|i| Value::RowRef(format!("collection_{:016x}", i % 32), u64::MAX - i))
        .collect();
    for round in 0..12 {
        for native in [round % 2 == 0, round % 2 != 0] {
            let start = Instant::now();
            for _ in 0..64 {
                if native {
                    for row in &rows {
                        let Value::RowRef(collection, id) = black_box(row) else {
                            unreachable!()
                        };
                        black_box((collection.as_str(), *id));
                    }
                } else {
                    for row in &rows {
                        black_box(runtime_value_text(black_box(row)).unwrap());
                    }
                }
            }
            let elapsed = start.elapsed();
            if round >= 2 {
                let ns = elapsed.as_nanos() as f64 / (rows.len() * 64) as f64;
                println!("{} {ns}", if native { "native" } else { "text" });
            }
        }
    }
}