From b8c9d552585425eceb46a65b9c4167aab3bd4484 Mon Sep 17 00:00:00 2001 From: profan Date: Sun, 7 Jun 2026 00:01:31 +0100 Subject: [PATCH] add comment regarding chunking of generated code --- Program.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Program.cs b/Program.cs index 6833148..fbc6863 100644 --- a/Program.cs +++ b/Program.cs @@ -694,6 +694,9 @@ internal static class Compiler lock (CompilerCache.CachedPrograms) { + // this number is derived very scientifically, on our sample program, this gives us about a kilobyte of IL + // for each function that we output into our function-of-functions that we eventually evaluate, + // and the JIT generally seems quite a lot happier to deal with smaller functions int maximumInstructionsPerChunk = 32; Stopwatch totalSw = Stopwatch.StartNew();