C# code is not shown as optimized
See original GitHub issuehttps://github.com/compiler-explorer/compiler-explorer/pull/3168 added support for C#, but as it looks the output isn’t optimized and looks more like a debug-output. Different compiler-flags as listed in the PR’s description and some comments don’t affect the output neither.
E.g. for https://godbolt.org/z/qdqdj5ffY expected output should be similar to
Foo:Bar(System.Span`1[System.Byte],long):ubyte:
mov rax, [rcx]
movzx eax, byte ptr [rax+rdx]
ret
as for instance Sharplab shows.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
How do I "tell" to C compiler that the code shouldn't be ...
You have several options: Compile without optimisations. Unlike some compilers, GCC doesn't optimise by default so unless you tell it to ...
Read more >Optimizing C and C++ code - EventHelix
In this article we will explore the following optimization techniques for C and C++ code developed for Real-time and Embedded Systems.
Read more >Debug Optimized Code - Visual Studio (Windows)
However, a bug might appear only in an optimized version of a program. In that case, you must debug the optimized code.
Read more >Optimization of Computer Programs in C
Describes C language techniques for source-level optimization of computer programs.
Read more >How to prevent optimization of a variable
This will allow easier debugging and will keep variables in the code that might be eliminated under higher optimization levels. To do this:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gfoidl Crossgen2 produces ReadyToRun quality of code which is less optimal than the JIT version. We want to improve the situation to produce the same JIT quality of code in future PRs.
/cc: @Egorbo for help with JIT compilation
@partouf Seems that some method signatures got removed unexpectedly in compiler explorer when both “Unused labels” and “Directives” filters enabled:
please comment in https://github.com/compiler-explorer/compiler-explorer/pull/3328 as that PR removes those parameters