3 ms·
I thought C#/.Net was much more permissive than Java/JVM regarding 'lying' about the call stack, in optimised release environments. [0] From a quick search it l
by MaxBarraclough 6y ago
I thought C#/.Net was much more permissive than Java/JVM regarding 'lying' about the call stack, in optimised release environments. [0] From a quick search it looks like tail-call optimisation is supported in the CLR but only when the IR is tagged appropriately, which the F# compiler takes advantage of, but the C# compiler does not. [1]
[0] https://www.hanselman.com/blog/release-is-not-debug-64bit-optimizations-and-c-method-inlining-in-release-build-call-stacks https://www.hanselman.com/blog/release-is-not-debug-64bit-op... , ctrl-f for this stack trace is showing the runtime reality.
[1] https://github.com/dotnet/runtime/issues/2191 https://github.com/dotnet/runtime/issues/2191