add comment regarding chunking of generated code

This commit is contained in:
profan 2026-06-07 00:01:31 +01:00
parent 0ab99cdd10
commit b8c9d55258
1 changed files with 3 additions and 0 deletions

View File

@ -694,6 +694,9 @@ internal static class Compiler
lock (CompilerCache<T>.CachedPrograms) lock (CompilerCache<T>.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; int maximumInstructionsPerChunk = 32;
Stopwatch totalSw = Stopwatch.StartNew(); Stopwatch totalSw = Stopwatch.StartNew();