diff --git a/Cargo.toml b/Cargo.toml index fb78d0e..e4192ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rocketsim_rs" description = "Rust bindings for the RocketSim project" -version = "0.30.0" +version = "0.30.1" edition = "2021" license = "MIT" repository = "https://github.com/VirxEC/rocketsim-rs" @@ -21,6 +21,8 @@ cxx-build = "1.0.122" [profile.release] lto = true +codegen-units = 1 +panic = "abort" [features] default = ["debug_logging", "bin"] diff --git a/build.rs b/build.rs index a3da452..76c5a9c 100644 --- a/build.rs +++ b/build.rs @@ -32,6 +32,8 @@ fn main() { if !cfg!(debug_assertions) { builder.define("RS_MAX_SPEED", "1"); + builder.flag_if_supported("-flto=thin"); + builder.opt_level_str("3"); } builder diff --git a/examples/real_bench.rs b/examples/real_bench.rs index 8abc453..cc4e886 100644 --- a/examples/real_bench.rs +++ b/examples/real_bench.rs @@ -5,7 +5,7 @@ use std::{ }; fn main() { - const TICKS: u32 = 50000; + const TICKS: u32 = 200_000; // load in assets rocketsim_rs::init(None); diff --git a/examples/thread_bench.rs b/examples/thread_bench.rs index be39f42..725e55f 100644 --- a/examples/thread_bench.rs +++ b/examples/thread_bench.rs @@ -2,18 +2,16 @@ use rocketsim_rs::sim::{Arena, CarConfig, Team}; use std::time::Instant; fn main() { - const TICKS: u32 = 250_000; + const TICKS: u32 = 1_000_000; // load in assets rocketsim_rs::init(None); let mut arena = Arena::default_standard(); - let _ = arena.pin_mut().add_car(Team::Blue, CarConfig::octane()); let _ = arena.pin_mut().add_car(Team::Blue, CarConfig::octane()); let _ = arena.pin_mut().add_car(Team::Blue, CarConfig::octane()); - let _ = arena.pin_mut().add_car(Team::Orange, CarConfig::octane()); let _ = arena.pin_mut().add_car(Team::Orange, CarConfig::octane()); let _ = arena.pin_mut().add_car(Team::Orange, CarConfig::octane());