refactor: optimize event args handling for performance improvements

This commit is contained in:
Miha Kralj
2025-12-28 17:21:53 -08:00
parent a64cc1c224
commit ad6eebf812
47 changed files with 59 additions and 51 deletions
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using System.Runtime.CompilerServices;
using Xunit;
+1 -1
View File
@@ -102,7 +102,7 @@ public sealed class LinReg : AbstractBase
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void Handle(object? sender, TValueEventArgs args) => Update(args.Value, args.IsNew);
private void Handle(object? sender, in TValueEventArgs args) => Update(args.Value, args.IsNew);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private double GetValidValue(double input)
+1 -1
View File
@@ -82,7 +82,7 @@ public sealed class Median : AbstractBase
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void Handle(object? sender, TValueEventArgs args) => Update(args.Value, args.IsNew);
private void Handle(object? sender, in TValueEventArgs args) => Update(args.Value, args.IsNew);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override TValue Update(TValue input, bool isNew = true)
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using Xunit;
using QuanTAlib;
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using Xunit;
using QuanTAlib;