Import Oxide engine (Stages 0–10) under MIT license

Full project snapshot migrated to new Gitea remote without history:
engine, editor, physics, script, examples, tests, docs, and assets.
Relicensed from GPLv3 to MIT and updated repo URLs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Homer Simpson
2026-07-05 20:41:02 +02:00
parent 2afb56b329
commit 9eead719b0
157 changed files with 47270 additions and 2 deletions
+31
View File
@@ -0,0 +1,31 @@
//! Benchmark for the Stage 5 schedule/module overhead.
//!
//! Stage 5 criterion: module/system scheduling overhead must be negligible
//! compared to the Stage-4 hardcoded loop. There is no per-frame work here — the
//! benchmark measures the *frame overhead itself*: advancing timing, walking the
//! phase lists, and the fixed-timestep accumulator, with a realistic handful of
//! empty systems registered. Check that `app_empty_update` is in the low
//! nanoseconds (i.e. lost in the noise next to any real system's work).
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use oxide_engine::app::{App, Schedule};
fn empty_update(c: &mut Criterion) {
let mut app = App::new();
// A few no-op systems spread across phases, as a trivial game might have.
for _ in 0..4 {
app.add_system(Schedule::Update, |_| {});
}
app.add_system(Schedule::FixedUpdate, |_| {});
app.add_system(Schedule::Render, |_| {});
c.bench_function("app_empty_update", |bencher| {
bencher.iter(|| {
app.update(black_box(1.0 / 60.0));
black_box(app.time.frame)
});
});
}
criterion_group!(benches, empty_update);
criterion_main!(benches);