diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:06:20 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:06:20 +0200 |
| commit | 0f7c70fd93db23ec866ae13aa2f146b7787afabf (patch) | |
| tree | 7a67019fa77931e1722789cfd27997dd82a9b521 /benches | |
| parent | 6672f8f7dfcb38bbda3ec92bdf95341c05e9a782 (diff) | |
Separate state and constraints 🧶
Diffstat (limited to 'benches')
| -rw-r--r-- | benches/benchmarks.rs | 6 |
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)))) }); } |
