remove nightly features
This commit is contained in:
parent
53cb50316e
commit
724d705d21
13
Cargo.lock
generated
13
Cargo.lock
generated
@ -1,6 +1,6 @@
|
|||||||
# This file is automatically @generated by Cargo.
|
# This file is automatically @generated by Cargo.
|
||||||
# It is not intended for manual editing.
|
# It is not intended for manual editing.
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ab_glyph"
|
name = "ab_glyph"
|
||||||
@ -174,7 +174,6 @@ name = "benchmarks"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"criterion",
|
"criterion",
|
||||||
"criterion-macro",
|
|
||||||
"parsing",
|
"parsing",
|
||||||
"pprof",
|
"pprof",
|
||||||
]
|
]
|
||||||
@ -570,16 +569,6 @@ dependencies = [
|
|||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "criterion-macro"
|
|
||||||
version = "0.3.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8421c08c2e60050bb24ebfb7232bdd2fcf44fa74c5777b00a71daa7d332a8164"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "criterion-plot"
|
name = "criterion-plot"
|
||||||
version = "0.4.5"
|
version = "0.4.5"
|
||||||
|
|||||||
@ -9,5 +9,4 @@ license = "AGPL-3.0"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
pprof = { version = "0.9", features = ["flamegraph"] }
|
pprof = { version = "0.9", features = ["flamegraph"] }
|
||||||
criterion = "0.3"
|
criterion = "0.3"
|
||||||
criterion-macro = "0.3"
|
|
||||||
parsing = { path = "../parsing" }
|
parsing = { path = "../parsing" }
|
||||||
|
|||||||
@ -1,17 +1,10 @@
|
|||||||
#![feature(custom_test_frameworks)]
|
use parsing::{split_function_chars, SplitType};
|
||||||
#![test_runner(criterion::runner)]
|
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
|
||||||
use parsing::split_function_chars;
|
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use std::{fs::File, os::raw::c_int, path::Path};
|
use std::{fs::File, os::raw::c_int, path::Path};
|
||||||
|
|
||||||
use criterion::profiler::Profiler;
|
use criterion::profiler::Profiler;
|
||||||
#[allow(unused_imports)]
|
use criterion::{criterion_group, criterion_main, Criterion};
|
||||||
use criterion::{BenchmarkId, Criterion};
|
|
||||||
use criterion_macro::criterion;
|
|
||||||
use pprof::ProfilerGuard;
|
use pprof::ProfilerGuard;
|
||||||
|
|
||||||
pub struct FlamegraphProfiler<'a> {
|
pub struct FlamegraphProfiler<'a> {
|
||||||
@ -62,7 +55,6 @@ fn custom_criterion_flamegraph() -> Criterion {
|
|||||||
custom_criterion().with_profiler(FlamegraphProfiler::new(100))
|
custom_criterion().with_profiler(FlamegraphProfiler::new(100))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[criterion(custom_criterion())]
|
|
||||||
fn mutli_split_function(c: &mut Criterion) {
|
fn mutli_split_function(c: &mut Criterion) {
|
||||||
let data_chars = vec![
|
let data_chars = vec![
|
||||||
"sin(x)cos(x)",
|
"sin(x)cos(x)",
|
||||||
@ -86,20 +78,23 @@ fn mutli_split_function(c: &mut Criterion) {
|
|||||||
for entry in data_chars {
|
for entry in data_chars {
|
||||||
group.bench_function(entry.iter().collect::<String>(), |b| {
|
group.bench_function(entry.iter().collect::<String>(), |b| {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
split_function_chars(&entry, parsing::suggestions::SplitType::Multiplication);
|
split_function_chars(&entry, SplitType::Multiplication);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
group.finish();
|
group.finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[criterion(custom_criterion_flamegraph())]
|
// Uncomment to enable flamegraph profiling
|
||||||
// fn single_split_function(c: &mut Criterion) {
|
// fn single_split_function(c: &mut Criterion) {
|
||||||
// let data_chars = "(2x+1)(3x+1)".chars().collect::<Vec<char>>();
|
// let data_chars = "(2x+1)(3x+1)".chars().collect::<Vec<char>>();
|
||||||
|
//
|
||||||
// c.bench_function("split_function", |b| {
|
// c.bench_function("split_function", |b| {
|
||||||
// b.iter(|| {
|
// b.iter(|| {
|
||||||
// split_function_chars(&data_chars);
|
// split_function_chars(&data_chars, SplitType::Multiplication);
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
criterion_group!(benches, mutli_split_function);
|
||||||
|
criterion_main!(benches);
|
||||||
|
|||||||
@ -1,6 +1,3 @@
|
|||||||
#![feature(const_trait_impl)]
|
|
||||||
#![feature(const_mut_refs)]
|
|
||||||
#![feature(const_for)]
|
|
||||||
mod autocomplete;
|
mod autocomplete;
|
||||||
mod autocomplete_hashmap;
|
mod autocomplete_hashmap;
|
||||||
mod parsing;
|
mod parsing;
|
||||||
|
|||||||
11
src/lib.rs
11
src/lib.rs
@ -1,14 +1,3 @@
|
|||||||
#![feature(const_mut_refs)]
|
|
||||||
#![feature(let_chains)]
|
|
||||||
#![feature(const_trait_impl)]
|
|
||||||
#![feature(const_fn_floating_point_arithmetic)]
|
|
||||||
#![feature(const_assume)]
|
|
||||||
#![feature(const_option_ext)]
|
|
||||||
#![feature(const_slice_index)]
|
|
||||||
#![feature(slice_split_at_unchecked)]
|
|
||||||
#![feature(inline_const)]
|
|
||||||
#![feature(const_for)]
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate static_assertions;
|
extern crate static_assertions;
|
||||||
|
|
||||||
|
|||||||
11
src/main.rs
11
src/main.rs
@ -1,14 +1,3 @@
|
|||||||
#![feature(const_mut_refs)]
|
|
||||||
#![feature(let_chains)]
|
|
||||||
#![feature(const_trait_impl)]
|
|
||||||
#![feature(const_fn_floating_point_arithmetic)]
|
|
||||||
#![feature(const_assume)]
|
|
||||||
#![feature(const_option_ext)]
|
|
||||||
#![feature(const_slice_index)]
|
|
||||||
#![feature(slice_split_at_unchecked)]
|
|
||||||
#![feature(inline_const)]
|
|
||||||
#![feature(const_for)]
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate static_assertions;
|
extern crate static_assertions;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user