Skip to content

Commit

Permalink
Update benchmarks (don't track ms perf)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Dec 13, 2023
1 parent 5d5de9c commit bcfb45d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ sarc.Write(ms);
| Read TitleBG (143MB. LE) | 24.27 ms | 140 MB |
| Read TitleBG (75MB, BE) | 29.16 ms | 74 MB |
| | | |
| Write TitleBG (143MB, LE) | 46.31 ms | 269 MB |
| Write TitleBG (75MB, BE) | 38.11 ms | 259 MB |
| Write TitleBG (143MB, LE) | 12.43 ms | 66 KB |
| Write TitleBG (75MB, BE) | 6.41 ms | 66 KB |
| | | |
| Read TitleBG (Immutable) (143MB, LE) | 16.61 ns | - |
| Read TitleBG (Immutable) (75MB, BE) | 16.27 ns | - |
Expand Down
4 changes: 2 additions & 2 deletions src/SarcLibrary.Runner/Benchmarks/ImmutableSarcBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public class ImmutableSarcBenchmarks
public void Read_LE()
{
RevrsReader reader = new(_bufferLE);
ImmutableSarc sarc = new(ref reader);
ImmutableSarc _ = new(ref reader);
}

[Benchmark]
public void Read_BE()
{
RevrsReader reader = new(_bufferBE);
ImmutableSarc sarc = new(ref reader);
ImmutableSarc _ = new(ref reader);
}
}
13 changes: 7 additions & 6 deletions src/SarcLibrary.Runner/Benchmarks/SarcBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,30 @@ public class SarcBenchmarks
private readonly Sarc _sarcLE = Sarc.FromBinary(File.ReadAllBytes(@"D:\bin\Sarc\TitleBG-LE.pack"));
private readonly Sarc _sarcBE = Sarc.FromBinary(File.ReadAllBytes(@"D:\bin\Sarc\TitleBG-BE.pack"));

private readonly MemoryStream _sarcMsLE = new();
private readonly MemoryStream _sarcMsBE = new();

[Benchmark]
public void Read_LE()
{
Sarc sarc = Sarc.FromBinary(_bufferLE);
Sarc _ = Sarc.FromBinary(_bufferLE);
}

[Benchmark]
public void Read_BE()
{
Sarc sarc = Sarc.FromBinary(_bufferBE);
Sarc _ = Sarc.FromBinary(_bufferBE);
}

[Benchmark]
public void Write_LE()
{
using MemoryStream ms = new();
_sarcLE.Write(ms);
_sarcLE.Write(_sarcMsLE);
}

[Benchmark]
public void Write_BE()
{
using MemoryStream ms = new();
_sarcBE.Write(ms);
_sarcBE.Write(_sarcMsBE);
}
}

0 comments on commit bcfb45d

Please sign in to comment.