首页 > 其他分享 >Compiler vs Interpreter

Compiler vs Interpreter

时间:2022-09-03 09:12:13浏览次数:85  
标签:code compiled vs interpreted program Interpreter Compiler

Compiler vs Interpreter

Compiler and Interpreter are two different ways to translate a program from programming or scripting language to machine language. 

A compiler takes entire program and converts it into object code which is typically stored in a file. The object code is also referred as binary code and can be directly executed by the machine after linking. Examples of compiled programming languages are C and C++

An Interpreter directly executes instructions written in a programming or scripting language without previously converting them to an object code or machine code. Examples of interpreted languages are Perl, Python and Matlab. 

Following are some interesting facts about interpreters and compilers. 

1) Both compilers and interpreters convert source code (text files) into tokens, both may generate a parse tree, and both may generate immediate instructions. The basic difference is that a compiler system, including a (built in or separate) linker, generates a stand alone machine code program, while an interpreter system instead performs the actions described by the high level program. 

2) Once a program is compiled, its source code is not useful for running the code. For interpreted programs, the source code is needed to run the program every time. 

3) In general, interpreted programs run slower than the compiled programs. 

4) Java programs are first compiled to an intermediate form, then interpreted by the interpreter. 

References: 
http://en.wikipedia.org/wiki/Interpreter_%28computing%29 
http://en.wikipedia.org/wiki/Compiler 

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above. 

 

标签:code,compiled,vs,interpreted,program,Interpreter,Compiler
From: https://www.cnblogs.com/chucklu/p/16651931.html

相关文章

  • macbook m1实现vscode下debug(解决无法读入的问题)
    需要下载的点击下载vscode,注意选择Mac的Universal版本(兼容intel和applesilicon)安装两个插件C/C++ExtensionPack,CodeLLDB需要开启的vscode输入command+......
  • keepalived实现lvs高可用
    keeplaived实现lvs高可用名称ipnode1(lvs,keepalived)192.168.6.152node2(lvs,keepalived)192.168.6.153rs1192.168.6.135rs2192.168.6.154#在......
  • vs2020 调试 dapr
    基础环境:Windows11专业版  MicrosoftVisualStudioEnterprise2022(64位)-Preview    引用: 思路:https://github.com/dapr/dotnet-sdk/issues/401#......
  • OpenCV的Windows程序图像处理,Win32 SDK,VS2022
    Windows程序调用OpenCV进行图像捕捉和处理显示1.OpenCV的视频接口VideoCapture很简洁,显示可以直接把图片帧数据转换成BMP,用StretchDIBits显示,方便又灵活。2.Windows用......
  • 新机器(禁止上网)安装vscode及公钥方式登陆linux
    1.1 新机器(禁止上网)安装vscode注意:以下三个程序版本必须一至。1) vscodeWin10安装程序2) win10插件(ssh客户端)3) linux里vscode-server-linux-x64.tar.gz(ssh服......
  • EDK2+Vscode Build Debug 环境配置
    配置shell环境使用工作区配置.vscode/settings.json "terminal.integrated.env.linux":{  "WORKSPACE"   :"${workspaceFolder}",  "EDK_TOOLS_PA......
  • ubuntu 16.04 vs code中调试ORB-SLAM3
    如果是在vscode中编译,在vscode中调试,那么执行如下,如果还是在终端中编译,只在vscode中调试,那么应该可以忽略(1-3)注意修改build.sh文件中最下面的DCMAKE_BUILD_TYPE为Deb......
  • AutoNumber VsCode插件开发
    AutoNumberVsCode插件开发:::details目录目录AutoNumberVsCode插件开发Step.2:安装脚手架Step.3:创建空项目Step.4:打包发布Step.5:本地打包Step.6:上传vs......
  • [面试]HandlerInterceptors vs. Filters in Spring MVC
    一.Filters过滤器是web服务器的一部分,而不是Spring框架的一部分。对于传入的请求,我们可以使用过滤器来操作甚至阻止请求到达任何的servlet。反之亦然,我们也可以阻止响应......
  • vscode 配置 plantuml
    官网:https://plantuml.com/zh/1.JDK下载安装https://www.oracle.com/java/technologies/javase-downloads.html本次安装PC下载:jdk-18_windows-x64_bin.msi,可以根据自......