From 4d8d2bf1f0ce08e7bea74508a8c889b15cad89c1 Mon Sep 17 00:00:00 2001 From: profan Date: Sun, 7 Jun 2026 19:05:20 +0100 Subject: [PATCH] another note --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1b97b42..0311b04 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ public static T Add(T a, T b) ... which to the normal C# eye would seem like you'd end up with a runtime branch every time this runs right? However because C# JIT implementations (RyuJIT included) monomorphizes generics when T is a value type, we end up with different versions of this function, and whenever it compiles one of these functions where it branches over types and typeof(T) along with branching over types is a specific pattern the JIT recognises, we actually end up with a function without any branches after the JIT has compiled the function for us. Fun! +... Good for us, because I abused this pattern a lot in this program in order to make it easy to toggle on/off vectorization! + # The Program ![The Application, in its 1024x1024 window](sharpero.png)