added benchmark results

This commit is contained in:
MaxOhn
2021-01-29 01:19:34 +01:00
parent 0e9cadffb9
commit 8f6de43091
9 changed files with 1855 additions and 8 deletions
+28 -2
View File
@@ -3,6 +3,7 @@
//! Conversions are generally not supported.
//!
//! ### Usage
//!
//! ```rust,no_run
//! use std::fs::File;
//! use rosu_pp::{Beatmap, BeatmapExt};
@@ -54,9 +55,11 @@
//! ```
//!
//! ### osu!standard versions
//!
//! - `all_included`: Both stack leniency & slider paths are considered so that the difficulty and pp calculation immitates osu! as close as possible. Pro: Most precise; Con: Least performant.
//! - `no_leniency`: The positional offset of notes created by stack leniency is not considered. This means the jump distance inbetween notes might be slightly off, resulting in small inaccuracies. Since calculating these offsets is relatively expensive though, this version is considerably faster than `all_included`.
//! - `no_slider_no_leniency` (i.e. [oppai](https://github.com/Francesco149/oppai-ng)): In addition to not considering the positional offset caused by stack leniency, slider paths are also ignored. This means the travel distance of notes is completely omitted which may cause further inaccuracies. Since the slider paths don't have to be computed though, it is generally faster than `no_leniency`.
//! **Note**: If the `fruits` feature is enabled, sliders will be parsed regardless, resulting in a reduced performance advantage of `no_sliders_no_leniency`.
//!
//! ### Features
//!
@@ -67,11 +70,34 @@
//! | `fruits` | Enable osu!ctb. |
//! | `mania` | Enable osu!mania. |
//! | `osu` | Enable osu!standard. Requires to also enable exactly one of the features `no_leniency`, `no_sliders_no_leniency`, or `all_included`. |
//! | `no_leniency` | When calculating difficulty attributes in osu!standard, ignore stack leniency but consider sliders. Solid middleground between performance and precision, suggested default version. |
//! | `no_leniency` | When calculating difficulty attributes in osu!standard, ignore stack leniency but consider sliders. Solid middleground between performance and precision, hence the default version. |
//! | `no_sliders_no_leniency` | When calculating difficulty attributes in osu!standard, ignore stack leniency and sliders. Best performance but slightly less precision than `no_leniency`. |
//! | `all_included` | When calculating difficulty attributes in osu!standard, consider both stack leniency and sliders. Best precision but significantly worse performance than `no_leniency`. |
//!
//! ### Benchmarks
//!
//! Comparing the PP calculation speed between [osu-perf](https://gitlab.com/JackRedstonia/osu-perf/), an [oppai-ng](https://github.com/Francesco149/oppai-ng) rust binding, and rosu-pp's `no_sliders_no_leniency`:
//!
//! ![crates PP calculation](./bechmark_results/crates_pp_calc.svg)
//! <img src="./bechmark_results/crates_pp_calc.svg">
//!
//! Comparing the PP calculation speed between rosu-pp's `all_included`, `no_leniency`, and `no_sliders_no_leniency` versions:
//!
//! ![rosu PP calculation](./bechmark_results/rosu_pp_calc.svg)
//! <img src="./bechmark_results/rosu_pp_calc.svg">
//!
//! Comparing the PP (in)accuracy between rosu-pp's `all_included`, `no_leniency`, and `no_sliders_no_leniency` versions:
//!
//! ![rosu PP inaccuracy](./bechmark_results/pp_inaccuracy.svg)
//! <img src="./bechmark_results/pp_inaccuracy.svg">
//!
//! Comparing the stars (in)accuracy between rosu-pp's `all_included`, `no_leniency`, and `no_sliders_no_leniency` versions:
//!
//! ![rosu stars inaccuracy](./bechmark_results/stars_inaccuracy.svg)
//! <img src="./bechmark_results/stars_inaccuracy.svg">
//!
//! ### Roadmap
//!
//! - osu sr versions
//! - [x] all included
//! - [x] no_leniency
@@ -86,7 +112,7 @@
//! - [x] mania pp
//! ---
//! - [x] refactoring
//! - [ ] benchmarking
//! - [x] benchmarking
pub mod fruits;
pub mod mania;
+1 -1
View File
@@ -449,7 +449,7 @@ mod tests {
#[test]
#[ignore]
fn all_included_single() {
// TOCHECK: 114708, 1208872
// TOCHECK: 114708, 1208872, 1322261
let file = match File::open("./maps/1295309.osu") {
Ok(file) => file,
Err(why) => panic!("Could not open file: {}", why),