Skip to content

Instantly share code, notes, and snippets.

View MaxOhn's full-sized avatar

Badewanne3 MaxOhn

  • Bathbot
  • Belgium
View GitHub Profile
@MaxOhn
MaxOhn / Program.cs
Last active March 8, 2024 11:50
Benchmarking osu!lazer against rosu-pp
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Formats;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Catch;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Mania;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Taiko;
using osu.Game.Scoring;
using System.Diagnostics;
@MaxOhn
MaxOhn / lib.rs
Created October 12, 2023 21:31
SmallArchivedVec
use rkyv::rel_ptr::RelPtr;
use rkyv::ser::{ScratchSpace, Serializer};
use rkyv::with::{ArchiveWith, DeserializeWith, SerializeWith};
use rkyv::{
out_field, Archive, Archived, Deserialize, DeserializeUnsized, Fallible, Serialize,
SerializeUnsized,
};
use std::alloc;
use std::slice;
@MaxOhn
MaxOhn / main.rs
Created September 2, 2023 02:30
Archiving by using a wrapper that converts types into something archivable
mod with_convert;
use rkyv::with::DeserializeWith;
use rkyv::{Archive, Archived, Deserialize, Fallible, Serialize};
use tracing::Level;
use self::with_convert::{ToArchivable, WithConvert};
fn main() {
let my_struct = MyStruct { level: Level::WARN };