diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:10:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:10:01 +0200 |
| commit | 38157b0e0cbab22dc3f5fa5cc66d9b673a18a55b (patch) | |
| tree | 967dab30f04537b93126586dbb7f7b0d166290e4 /benches | |
| parent | e94627721db89c3b08aa17f54d59d19a09f7816f (diff) | |
Synchronous layout 🪀
Diffstat (limited to 'benches')
| -rw-r--r-- | benches/benchmarks.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 64c59d70..5f706e69 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -3,7 +3,6 @@ use std::rc::Rc; use criterion::{criterion_group, criterion_main, Criterion}; use fontdock::fs::{FsIndex, FsSource}; -use futures_executor::block_on; use typstc::eval::{eval, State}; use typstc::font::FontLoader; @@ -28,15 +27,15 @@ fn benchmarks(c: &mut Criterion) { let tree = parse(COMA).output; let document = eval(&tree, state.clone()).output; - let _ = block_on(layout(&document, Rc::clone(&loader))); + let _ = layout(&document, Rc::clone(&loader)); c.bench_function("parse-coma", |b| b.iter(|| parse(COMA))); c.bench_function("eval-coma", |b| b.iter(|| eval(&tree, state.clone()))); c.bench_function("layout-coma", |b| { - b.iter(|| block_on(layout(&document, Rc::clone(&loader)))) + b.iter(|| layout(&document, Rc::clone(&loader))) }); c.bench_function("typeset-coma", |b| { - b.iter(|| block_on(typeset(COMA, state.clone(), Rc::clone(&loader)))) + b.iter(|| typeset(COMA, state.clone(), Rc::clone(&loader))) }); } |
