Skip to content

Commit 888a152

Browse files
committed
Merge branch 'dev'
2 parents bf6f692 + e74f73e commit 888a152

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,25 @@ await engine.RunAsync(splitData, cts.Token);
163163
164164
---
165165

166+
## Benchmarks
167+
168+
Performance benchmarks run on Apple M3 Max with .NET 9.0, processing **4 million candlesticks** (1 symbol × 4 timeframes × 1,000,000 candles each):
169+
170+
| Method | Mean | Error | StdDev | Gen0 | Allocated |
171+
|------------- |---------:|--------:|--------:|-------:|----------:|
172+
| EngineV8Run | 125.7 ns | 0.45 ns | 0.42 ns | 0.0620 | 520 B |
173+
| EngineV9Run | 128.4 ns | 2.31 ns | 2.16 ns | 0.0629 | 528 B |
174+
| EngineV10Run | 102.0 ns | 2.00 ns | 1.96 ns | 0.0545 | 456 B |
175+
176+
**Key findings:**
177+
- **EngineV10** is ~19% faster than EngineV8 and ~21% faster than EngineV9
178+
- **EngineV10** allocates 12% less memory than EngineV8
179+
- All engines maintain sub-microsecond per-tick latency
180+
181+
> Benchmarks run with BenchmarkDotNet v0.15.8 on macOS Tahoe 26.2, Apple M3 Max, .NET 9.0.8
182+
183+
---
184+
166185
## Development
167186

168187
### Prerequisites

benchmarks/Backtest.Net.Benchmarks/EngineBenchmarks/EngineBenchmark.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public async Task Setup()
2929
WarmupCandlesCount = 2;
3030

3131
GeneratedSymbolsDataV2 = SymbolDataSplitterBenchmark.GenerateFakeSymbolsDataV2(["BTCUSDT"],
32-
[CandlestickInterval.M5, CandlestickInterval.D1],
33-
StartingDate.AddHours(-WarmupCandlesCount), 5000);
32+
[CandlestickInterval.M5, CandlestickInterval.M15, CandlestickInterval.M30, CandlestickInterval.H4],
33+
StartingDate.AddHours(-WarmupCandlesCount), 1_000_000);
3434

3535
var symbolDataSplitterV2 = new SymbolDataSplitterV2(DaysPerSplit, WarmupCandlesCount, StartingDate);
3636
SplitDataV2 = await symbolDataSplitterV2.SplitAsyncV2(GeneratedSymbolsDataV2);

0 commit comments

Comments
 (0)