AndriiKuznietsov75, Ukrainian
@AndriiKuznietsov75@social.kyiv.dcomm.net.ua avatar

Як працюють компіляція та виконання коду👇
🔸Компілювані мови (#C, C++, )
Вихідний код перетворюється компілятором на машинний. Машинний код виконується безпосередньо процесором.
🔸Байт-код (, C#)
Вихідний код компілюється у байт-код, а потім JVM виконує програму. Іноді JIT-компілятор компілює вихідний код у машинний, щоб прискорити виконання.
🔸Інтерпретовані мови (, , )
Тут для виконання програми не потрібен машинний код, натомість програму рядково виконають інтерпретатори.

video/mp4

tshirtman,
@tshirtman@mas.to avatar

@AndriiKuznietsov75 python at least it's not directly interpreted, it's compiled on the fly at run time, and the compiled bytecode is then executed by the Python VM, pretty much like java code is executed by the JVM. The compilation step is just done transparently.

maxd,
@maxd@mastodon.social avatar

@tshirtman @AndriiKuznietsov75 IIUC that's also the case for Ruby. And of course, languages don't mandate a specific flow, it's an implementation detail. There's RubyMotion/DragonRuby compiled to native, or PyPy that JIT-compiles Python.

tshirtman,
@tshirtman@mas.to avatar

@maxd @AndriiKuznietsov75 yeah, i though it was probably the case for ruby as well, but i know much less about it, and didn't want to spend the time researching, but i would be a bit surprised if it's directly interpreted. And afaik JS is also JIT in most implementations. Direct interpretation certainly leaves a lot of performance on the table.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Java
  • DreamBathrooms
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • ethstaker
  • Youngstown
  • everett
  • slotface
  • osvaldo12
  • rosin
  • mdbf
  • kavyap
  • thenastyranch
  • ngwrru68w68
  • provamag3
  • Durango
  • modclub
  • cubers
  • khanakhh
  • Leos
  • tacticalgear
  • cisconetworking
  • vwfavf
  • tester
  • anitta
  • normalnudes
  • megavids
  • JUstTest
  • All magazines