Skip to content

Commit

Permalink
fixup! perf: add microbenchmarks for a simple diamond with string man…
Browse files Browse the repository at this point in the history
…ipulation
  • Loading branch information
MingweiSamuel committed Oct 1, 2024
1 parent 0aeaa83 commit ceecc28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
File renamed without changes.
4 changes: 3 additions & 1 deletion benches/benches/words_diamond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ const OUTPUT: usize = 5_123_595;
static WORDS: LazyLock<String> = LazyLock::new(|| {
let mut path = PathBuf::new();
path.push(std::env::current_dir().unwrap());
path.pop();
path.push(file!());
path.pop();
path.push("words_alpha.txt");
println!("{:?}", path);
std::fs::read_to_string(path).unwrap()
});
fn words() -> impl Iterator<Item = String> + Clone {
Expand Down

0 comments on commit ceecc28

Please sign in to comment.