Skip to content

Instantly share code, notes, and snippets.

View booiris's full-sized avatar
🦄

booiris

🦄
View GitHub Profile
@booiris
booiris / graph_bench.rs
Created March 20, 2024 16:13
图结构性能测试
use core::time;
use std::{
fs::File,
io::{self, BufReader, Cursor, Read, StdinLock},
time::Instant,
};
// https://bheisler.github.io/criterion.rs/book/getting_started.html
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
use rand::{rngs::StdRng, Rng, SeedableRng};
@booiris
booiris / gist:68b0def25da4d820b52a65bebe3017eb
Last active March 18, 2024 05:21
全局读取器使用裸指针和 refcell 性能测试
use core::time;
use std::{
fs::File,
io::{self, BufReader, Cursor, Read, StdinLock},
time::Instant,
};
// https://bheisler.github.io/criterion.rs/book/getting_started.html
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};