From f9b6a64b845dabdf1773da49f248def479659934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 1 Feb 2021 21:49:12 +0100 Subject: tihdy -> sylt --- benches/tihdy_benchmark.rs | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 benches/tihdy_benchmark.rs (limited to 'benches/tihdy_benchmark.rs') diff --git a/benches/tihdy_benchmark.rs b/benches/tihdy_benchmark.rs deleted file mode 100644 index f639fb0..0000000 --- a/benches/tihdy_benchmark.rs +++ /dev/null @@ -1,42 +0,0 @@ -use criterion::{criterion_group, criterion_main, Criterion}; -use std::path::Path; - -pub fn fib_50(c: &mut Criterion) { - let prog = -" -j := 0 -for , j < 1000, j = j + 1 { - a := 0 - b := 1 - - for i := 0, i < 50, i = i + 1 { - c := a - a = b - b = c + b - } - a <=> 12586269025 -} -"; - let compiled = tihdy::compiler::compile("main", Path::new("prog"), tihdy::tokenizer::string_to_tokens(prog)).unwrap(); - c.bench_function("fib 50", |b| b.iter(|| tihdy::vm::run_block(&compiled).unwrap())); -} - -pub fn fib_90(c: &mut Criterion) { - let prog = -" -a := 0 -b := 1 - -for i := 0, i < 90, i = i + 1 { - c := a - a = b - b = c + b -} -a <=> 2880067194370816120 -"; - let compiled = tihdy::compiler::compile("main", Path::new("prog"), tihdy::tokenizer::string_to_tokens(prog)).unwrap(); - c.bench_function("fib 90", |b| b.iter(|| tihdy::vm::run_block(&compiled).unwrap())); -} - -criterion_group!(benches, fib_50, fib_90); -criterion_main!(benches); -- cgit v1.2.1