virtual machine - Is intermediate representation (such as bytecodes or .net IL) still an advantage? -


is intermediate representation--ir--such java bytecodes or .net cil, still advantage? can’t deploy software components in source-code?

one of arguments in favor of ir, portability of software components, avoids need of compiling source code each target architecture (regarding existence of virtual machine architecture). ir offers abstraction on each architecture specificities. in same way , metadata brings other advantages in terms of enabling security guarantees; checking safety accesses; etc.

today, technologies such node.js (with v8 engine) introduces idea of deployable components in source code, called packages in node.js (i not sure if seminal idea in node.js). source code contains same information of ir + metadata. moreover, using components in source code, not prevent runtime engine using same principles of modern virtual machine such just-in-time compilation , late-bound data types, allows adaptive optimization , in theory can yield faster execution.

so, there advantage of deploying software components in ir on components in source-code?

the distinctions begin blur in cases note below. in general:

  • one advantage of ir bytecode is obfuscates logic have created. however, minified javascript, , similar degree in cases.

  • another advantage reduced size, minified javascript small, perhaps so.

  • a third advantage faster jit compilation, bytecode closer actual machine instructions source code be. while can jit source code, take more instructions and/or memory it. else equal, should better performance bytecode deployment. should noted else equal, may not observe performance advantage, or may relatively small depending on performance needs.

  • a fourth advantage can more have other languages target bytecode ir target language. while possible create language compiles javascript, easier compile down bytecode, , have more control on performance , correctness of result, since compiling down closer machine code.

  • lastly, possible, , done in cases, website instance, hand tune bytecode performance, people assembler.

now distinction can blurry. 1 imagine heavy-weight bytecode format, perhaps due need support vast range of hardware, or perhaps due poor design, might farther removed machine code say, interpreted ansi c be. if assume bytecode reasonable attempt approximate machine instructions, , assume "source code" represents high level c or higher, advantages above should hold.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -