yeee
This commit is contained in:
parent
8e0e60ebbc
commit
fbc75fd063
15
README.md
15
README.md
|
|
@ -9,15 +9,16 @@ This program is also an interactive visualizer of the rendering process, allowin
|
||||||
# Interesting Things
|
# Interesting Things
|
||||||
When attempting to compile the inner loop (flattening the instructions into a big C# function) I ran into limits where making functions too large made the JIT quite unhappy (either because it physically refuses to make functions with more than 65 kilobytes of CIL), or because it simply performed quite poorly when jitting large functions, so I ended up with an experimentally derived "max instructions per chunk" which ends up splitting the generated inner loop into a number of subfunctions, as many subfunctions as are needed, and the final program ends up being something like:
|
When attempting to compile the inner loop (flattening the instructions into a big C# function) I ran into limits where making functions too large made the JIT quite unhappy (either because it physically refuses to make functions with more than 65 kilobytes of CIL), or because it simply performed quite poorly when jitting large functions, so I ended up with an experimentally derived "max instructions per chunk" which ends up splitting the generated inner loop into a number of subfunctions, as many subfunctions as are needed, and the final program ends up being something like:
|
||||||
```cs
|
```cs
|
||||||
void EvaluateLoop()
|
void EvaluateLoop()
|
||||||
{
|
{
|
||||||
EvaluateChunk1();
|
EvaluateChunk1();
|
||||||
EvaluateChunk2();
|
EvaluateChunk2();
|
||||||
EvaluateChunk3();
|
EvaluateChunk3();
|
||||||
// ... etc, with the current program and chunk size, this ends up being about 200 of these subprograms being generated
|
// ... etc, with the current program and chunk size, this ends up being about 200 of these subprograms being generated
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# The Program
|
||||||

|

|
||||||
|
|
||||||
# How do I run it?
|
# How do I run it?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue