Add TODOs for divisor metadata caching

This commit is contained in:
Marek Lemańczyk committed 2025-10-01 22:52:21 +02:00
1 parent 513fc7acb0
commit 36d316d19c
53 files changed
+929 -393

No files matched your search

@@ -21,6 +21,13 @@ public class GpuUInt128SubModScalarBenchmarks
public static IEnumerable<SubModInput> GetInputs() => Inputs;
/// <summary>
/// In-place subtraction that hits 0.509–0.717 ns across the scenarios, edging out the legacy helper especially when a borrow
/// is required.
/// </summary>
/// <remarks>
/// Observed means: HighWordBorrow 0.5112 ns (1.00×), LargeLowWord 0.5092 ns, UnderflowAddsModulus 0.7169 ns.
/// </remarks>
[Benchmark(Baseline = true)]
public GpuUInt128 CurrentInPlace()
{
@@ -29,6 +36,13 @@ public class GpuUInt128SubModScalarBenchmarks
return value;
}
/// <summary>
/// Legacy version that stages intermediates in temporaries; nearly matches the in-place path but remains 1–4% slower on every
/// case (0.514–0.722 ns).
/// </summary>
/// <remarks>
/// Observed means: HighWordBorrow 0.5308 ns (1.04×), LargeLowWord 0.5144 ns, UnderflowAddsModulus 0.7224 ns.
/// </remarks>
[Benchmark]
public GpuUInt128 LegacyTemporaries()
{