|
|
|
|
|
by neonsunset
817 days ago
|
|
Correction:
JVM implementations perform escape analysis, in particular, because Java does not have structs.
.NET does not perform escape analysis for objects and all attempts to experiment with it so far has shown greater impact on compilation speed with little to no profit in allocation rate. However, you will find average allocation traffic much lower in .NET because C# already puts way more data on stack through structs, non-boxing operations (where Java boxes), stack allocated buffers, non-copying slicing with spans and object pooling (which is common in Java too). |
|
Appreciate the detail about the stack allocated bits in .NET.