oxc/tasks/benchmark/benches/minifier.rs
Boshen ceeee5909b
Remove HIR (#917)
closes #273
closes #814

HIR is removed from this PR, with the minifier being commented out.

HIR is a wonderful idea for compiling to lower languages, but after
sitting on it for a few months I found that it only adds confusion and
uncertainties to both myself and future contributors.

It also adds too much burden to maintainers if we plan to support more
downstream tools.

1 AST is the only way.
2023-09-15 23:48:32 +08:00

31 lines
1 KiB
XML

// #[cfg(not(target_env = "msvc"))]
// #[global_allocator]
// static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
// #[cfg(target_os = "windows")]
// #[global_allocator]
// static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
// use oxc_benchmark::{criterion_group, criterion_main, BenchmarkId, Criterion};
// // use oxc_minifier::{Minifier, MinifierOptions};
// use oxc_span::SourceType;
// use oxc_tasks_common::TestFiles;
// fn bench_minifier(criterion: &mut Criterion) {
// let mut group = criterion.benchmark_group("minifier");
// for file in TestFiles::minimal().files() {
// group.bench_with_input(
// BenchmarkId::from_parameter(&file.file_name),
// &file.source_text,
// |b, source_text| {
// let source_type = SourceType::from_path(&file.file_name).unwrap();
// let options = MinifierOptions::default();
// b.iter_with_large_drop(|| Minifier::new(source_text, source_type, options).build());
// },
// );
// }
// group.finish();
// }
// criterion_group!(minifier, bench_minifier);
// criterion_main!(minifier);