edge-bench-rs: file stems and subject remainders by hand, mimalloc
The suffix and remainder regexes were most of a new file's description (333k on boneless 2026): now plain byte matching, with the regex versions kept as the reference in a test of tricky names and subjects. mimalloc for the many small strings. Boneless 2026: 360k -> 495k headers/s; check.ts still finds the outputs identical on all three captures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bacc9aa3b3
commit
43e74199d4
5 files changed
+289
-4
No files matched your search
@@ -18,6 +18,10 @@ use rustc_hash::FxHashMap;
|
||||
use std::io::{Read, Write};
|
||||
use std::time::Instant;
|
||||
|
||||
// Many small strings (message-ids, names): the system allocator was a measurable share.
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
fn inflate(raw: &[u8]) -> Vec<u8> {
|
||||
let mut out = Vec::with_capacity(raw.len() * 6);
|
||||
if raw.starts_with(&[0x1f, 0x8b]) {
|
||||
@@ -200,6 +204,9 @@ fn main() {
|
||||
}
|
||||
}
|
||||
let total = inflate_s + index_s;
|
||||
#[allow(static_mut_refs)]
|
||||
let p = unsafe { indexer::PROF };
|
||||
eprintln!("describe {:.2} s ({} calls), dates {:.2} s, aggregate {:.2} s, evict+cutoff {:.2} s, judge+encode {:.2} s", p[0] as f64 / 1e9, p[1], p[2] as f64 / 1e9, p[3] as f64 / 1e9, p[4] as f64 / 1e9, p[5] as f64 / 1e9);
|
||||
println!("{group} {start}–{end}: {} chunks, {} MB compressed, {} MB text", files.len(), compressed / 1_000_000, text_bytes / 1_000_000);
|
||||
println!(
|
||||
"{} headers in {:.2} s ({:.0}/s on one core; wall {:.2} s)",
|
||||
|
||||
Reference in new issue
Block a user