summaryrefslogtreecommitdiff
path: root/benches
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-10-04 19:06:20 +0200
committerLaurenz <laurmaedje@gmail.com>2020-10-04 19:06:20 +0200
commit0f7c70fd93db23ec866ae13aa2f146b7787afabf (patch)
tree7a67019fa77931e1722789cfd27997dd82a9b521 /benches
parent6672f8f7dfcb38bbda3ec92bdf95341c05e9a782 (diff)
Separate state and constraints 🧶
Diffstat (limited to 'benches')
-rw-r--r--benches/benchmarks.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs
index 62f729a0..3ffee01e 100644
--- a/benches/benchmarks.rs
+++ b/benches/benchmarks.rs
@@ -5,6 +5,7 @@ use criterion::{criterion_group, criterion_main, Criterion};
use fontdock::fs::{FsIndex, FsProvider};
use futures_executor::block_on;
+use typstc::eval::State;
use typstc::font::FontLoader;
use typstc::parse::parse;
use typstc::typeset;
@@ -25,10 +26,9 @@ fn typesetting_benchmark(c: &mut Criterion) {
let loader = FontLoader::new(Box::new(provider), descriptors);
let loader = Rc::new(RefCell::new(loader));
- let style = Default::default();
- let scope = typstc::library::_std();
+ let state = State::default();
c.bench_function("typeset-coma", |b| {
- b.iter(|| block_on(typeset(COMA, &style, &scope, Rc::clone(&loader))))
+ b.iter(|| block_on(typeset(COMA, state.clone(), Rc::clone(&loader))))
});
}