Click here to Skip to main content
15,886,919 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
honey the codewitch22-Jan-24 13:54
mvahoney the codewitch22-Jan-24 13:54 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
jschell22-Jan-24 5:58
jschell22-Jan-24 5:58 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
honey the codewitch22-Jan-24 6:00
mvahoney the codewitch22-Jan-24 6:00 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
trønderen22-Jan-24 10:10
trønderen22-Jan-24 10:10 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
honey the codewitch22-Jan-24 10:12
mvahoney the codewitch22-Jan-24 10:12 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
trønderen22-Jan-24 10:55
trønderen22-Jan-24 10:55 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
jschell23-Jan-24 5:26
jschell23-Jan-24 5:26 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
honey the codewitch23-Jan-24 5:43
mvahoney the codewitch23-Jan-24 5:43 
I could, and indeed I do one small optimization with my Reflect Emit based compiler that isn't possible - at least readily in C#.

C#
if((codepoint>='A' && codepoint<='Z') || codepoint=='_' || (codepoint>='a' && codepoint<='a')


The comparison ranges are in sorted order left to right. So rather than run through all of the || conditions, I short circuit if the minimum of the next range in the series is greater than the codepoint. It's easy to do in IL since all of this is already resolved to a series of jumps. Not so easy in C#.

But I did it there because it was a minor change, and didn't really impact anything. I'd be far more hesitant to create a total fork in my compiler vs. source generator. The performance benefits would have to be compelling.

Fortunately, I didn't need to do that here, because my fears were not realized in the end. The JITter was smart enough to optimize that code. But if it wasn't, I could have reorganized my generated source code to produce more efficient IL, in that it would translate to more efficient native code on most platforms.

I'd have preferred that approach as it keeps things from being black boxed.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
trønderen23-Jan-24 9:06
trønderen23-Jan-24 9:06 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
jschell24-Jan-24 4:38
jschell24-Jan-24 4:38 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
Alister Morton22-Jan-24 22:59
Alister Morton22-Jan-24 22:59 
GeneralRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
honey the codewitch23-Jan-24 3:29
mvahoney the codewitch23-Jan-24 3:29 
JokeRe: Does anyone know of a good guide to the MSIL JIT compiler? Pin
jschell23-Jan-24 5:27
jschell23-Jan-24 5:27 
GeneralRIP David Mills Pin
Mircea Neacsu19-Jan-24 15:54
Mircea Neacsu19-Jan-24 15:54 
GeneralRe: RIP David Mills Pin
jmaida19-Jan-24 17:14
jmaida19-Jan-24 17:14 
GeneralRe: RIP David Mills Pin
Nelek19-Jan-24 21:32
protectorNelek19-Jan-24 21:32 
GeneralRe: RIP David Mills Pin
David O'Neil19-Jan-24 22:18
professionalDavid O'Neil19-Jan-24 22:18 
GeneralRe: RIP David Mills Pin
Nelek20-Jan-24 6:29
protectorNelek20-Jan-24 6:29 
GeneralRe: RIP David Mills Pin
jschell22-Jan-24 6:00
jschell22-Jan-24 6:00 
GeneralRe: RIP David Mills Pin
Nelek22-Jan-24 8:28
protectorNelek22-Jan-24 8:28 
GeneralRe: RIP David Mills Pin
Daniel Pfeffer20-Jan-24 5:02
professionalDaniel Pfeffer20-Jan-24 5:02 
GeneralRe: RIP David Mills Pin
Nelek20-Jan-24 6:26
protectorNelek20-Jan-24 6:26 
GeneralRe: RIP David Mills Pin
obermd20-Jan-24 8:35
obermd20-Jan-24 8:35 
GeneralRe: RIP David Mills Pin
Nelek20-Jan-24 9:59
protectorNelek20-Jan-24 9:59 
GeneralRe: RIP David Mills Pin
PIEBALDconsult24-Jan-24 6:30
mvePIEBALDconsult24-Jan-24 6:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.