fn everything(c: &mut Criterion) {
    let flux = include_str!("./everything.flux");
    let mut group = c.benchmark_group("parse");
    group.bench_function("everything.flux", |b| {
        b.iter(black_box(|| {
            parse_string("".to_string(), flux);
        }));
    });
    group.finish();

    let mut group = c.benchmark_group("infer");
    group.sample_size(10).bench_function("bootstrap", |b| {
        b.iter(black_box(|| {
            let (prelude, _, _) = bootstrap::infer_stdlib_dir(Path::new("../../stdlib")).unwrap();
            assert!(prelude.len() > 0);
        }));
    });
    group.finish();
}
// everything.flux was generated by running the following
// command from this directory. This file is trimmed to 5000
// lines, as the 52k lines pre-trim would cause the benchmark
// test to take a very long time (almost three hours).
// for file in `find ../../../../stdlib -name "*.flux"`; do
// cat $file | grep -v "^package" | grep -v "^import" | grep -v "^$" >> everything.flux
// done
everything.flux was generated by running the following
command from this directory. This file is trimmed to 5000
lines, as the 52k lines pre-trim would cause the benchmark
test to take a very long time (almost three hours).
everything . flux was generated by running the following command from this directory . This file is trimmed to 5000 lines as the 52k lines pre - trim would cause the benchmark test to take a very long time ( almost three hours ) .
fn everything(c: &mut Criterion) {
    let flux = include_str!("./everything.flux");
    let mut group = c.benchmark_group("parse");
    group.bench_function("everything.flux", |b| {
        b.iter(black_box(|| {
            parse_string("".to_string(), flux);
        }));
    });
    group.finish();
    let mut group = c.benchmark_group("infer");
    group.sample_size(10).bench_function("bootstrap", |b| {
        b.iter(black_box(|| {
            let (prelude, _, _) = bootstrap::infer_stdlib_dir(Path::new("../../stdlib")).unwrap();
            assert!(prelude.len() > 0);
        }));
    });
    group.finish();
}
fn everything ( c : & mut Criterion ) { let flux = include_str ! ( " " ) ; let mut group = c . benchmark_group ( " " ) ; group . bench_function ( " " , | b | { b . iter ( black_box ( | | { parse_string ( " " . to_string ( ) , flux ) ; } ) ) ; } ) ; group . finish ( ) ; let mut group = c . benchmark_group ( " " ) ; group . sample_size ( 10 ) . bench_function ( " " , | b | { b . iter ( black_box ( | | { let ( prelude , _ , _ ) = bootstrap :: infer_stdlib_dir ( Path :: new ( " " ) ) . unwrap ( ) ; assert ! ( prelude len ( ) 0 ) ; } ) ) ; } ) ; group . finish ( ) ; }
everything.flux was generated by running the following
command from this directory.
everything . flux was generated by running the following command from this directory .
c
&mut Criterion
c
&mut Criterion