c# - What's the purpose of the 'short' notation of IL? -


every time bumb them in il: br_s, ldc_i4_s, ldarg_s, etc, etc... have ask question:

i mean... if you're jit'ing language il native assembler, shouldn't matter in terms of performance, right? what's purpose of having these 'short-hand' notations? having fewer bytes in il binaries (e.g. compression mechanism) or there other reason?

and if it's compression mechanism, why not use compression algorithm deflate?

sure, micro-optimization. golden rule of micro-optimizing applies here, turn macro when can apply optimization on , on again. case here, method bodies small vast majority of branches short ones, methods have limited number of arguments , local variables single byte enough address them, constants 0 through 9 appear in real program.

add them , have macro-optimization on large assembly, many kilobytes shaved-off. does matter @ runtime, that's il doesn't have page-faulted ram. warm-start time in jitted program issue , has been attacked every possible angle.

in general, .net framework relentlessly micro-optimized. largely because microsoft can't assume code won't on critical path in program.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -