{"id":2417,"date":"2018-06-22T01:44:26","date_gmt":"2018-06-22T01:44:26","guid":{"rendered":"https:\/\/askanacademic.com\/uncategorized\/the-difference-between-interpreters-and-compilers-944\/"},"modified":"2019-09-20T14:32:05","modified_gmt":"2019-09-20T14:32:05","slug":"the-difference-between-interpreters-and-compilers-944","status":"publish","type":"post","link":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/","title":{"rendered":"The Difference Between Interpreters and Compilers"},"content":{"rendered":"

Question<\/h2>\n

distinguish between interpreter and compiler?<\/p>\n

Answer<\/h2>\n

Both interpreters and compilers are used to translate source code into object code. Although they both achieve the same end objective, the method in which they do so is substantially different.<\/p>\n


\nInterpreters<\/strong><\/p>\n

\u2022 Input a single instruction at a time.<\/p>\n

\u2022 No intermediate representation (code that provides a programmer with ability to optimise the code based on the target machine).<\/p>\n

\u2022 Control statements (\u2018If\u2019 statements) are slow to execute.<\/p>\n

\u2022 Errors are displayed for every interpreted instruction making them both easy to notice but slow to produce.<\/p>\n

\u2022 Interpreters require less memory to function as no intermediate code is created.<\/p>\n

Compilers<\/strong><\/p>\n

\u2022 Input the entire set of instructions at once.<\/p>\n

\u2022 Provide intermediate representation.<\/p>\n

\u2022 Control statements are faster to execute.<\/p>\n

\u2022 Errors are not produced after each instruction meaning that the compiling is fast, but mistakes are often difficult to notice.<\/p>\n

\u2022 Compilers require more memory as they create intermediate code.<\/p>\n

Conclusion<\/strong><\/p>\n

Essentially the main difference between the two is their level of approachability and in the case of varied target machine architecture, their practicability. For novices, interpreters may be slower but they provide an easier method for detecting errors in source code and aid in producing an error free object code. Compilers on the other hand for experienced users provide a much quicker method of producing object code, however they do not provide the same degree of problem recognition. The addition of intermediate code produced by compilers also allows a programmer to tailor their code to particular target machines, often making compilers more practical.<\/p>\n

References<\/h2>\n","protected":false},"excerpt":{"rendered":"

Question distinguish between interpreter and compiler? Answer Both interpreters and compilers are used to translate source code into object code. Although they both achieve the same end objective, the method in which they do so is substantially different. Interpreters \u2022 Input a single instruction at a time. \u2022 No intermediate representation (code that provides a …<\/p>\n","protected":false},"author":1,"featured_media":1932,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"yoast_head":"\nThe Difference Between Interpreters and Compilers<\/title>\n<meta name=\"description\" content=\"Question distinguish between interpreter and compiler? Answer Both interpreters and compilers are used to translate source code into object code. Although\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Difference Between Interpreters and Compilers\" \/>\n<meta property=\"og:description\" content=\"Question distinguish between interpreter and compiler? Answer Both interpreters and compilers are used to translate source code into object code. Although\" \/>\n<meta property=\"og:url\" content=\"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/\" \/>\n<meta property=\"og:site_name\" content=\"Ask an Academic\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Ask-an-Academic-571412300039347\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-22T01:44:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-20T14:32:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/askanacademic.com\/wp-content\/uploads\/2019\/01\/computing-and-ict.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"835\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"AskanAcademic.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"AskanAcademic.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The Difference Between Interpreters and Compilers","description":"Question distinguish between interpreter and compiler? Answer Both interpreters and compilers are used to translate source code into object code. Although","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/","og_locale":"en_US","og_type":"article","og_title":"The Difference Between Interpreters and Compilers","og_description":"Question distinguish between interpreter and compiler? Answer Both interpreters and compilers are used to translate source code into object code. Although","og_url":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/","og_site_name":"Ask an Academic","article_publisher":"https:\/\/www.facebook.com\/Ask-an-Academic-571412300039347\/","article_published_time":"2018-06-22T01:44:26+00:00","article_modified_time":"2019-09-20T14:32:05+00:00","og_image":[{"width":1280,"height":835,"url":"https:\/\/askanacademic.com\/wp-content\/uploads\/2019\/01\/computing-and-ict.jpg","type":"image\/jpeg"}],"author":"AskanAcademic.com","twitter_card":"summary_large_image","twitter_misc":{"Written by":"AskanAcademic.com","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/#article","isPartOf":{"@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/"},"author":{"name":"AskanAcademic.com","@id":"https:\/\/askanacademic.com\/#\/schema\/person\/88d510b2a53ef0ce64579418a0c55dde"},"headline":"The Difference Between Interpreters and Compilers","datePublished":"2018-06-22T01:44:26+00:00","dateModified":"2019-09-20T14:32:05+00:00","mainEntityOfPage":{"@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/"},"wordCount":260,"publisher":{"@id":"https:\/\/askanacademic.com\/#organization"},"image":{"@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/#primaryimage"},"thumbnailUrl":"https:\/\/askanacademic.com\/wp-content\/uploads\/2019\/01\/computing-and-ict.jpg","articleSection":["Computing and ICT"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/","url":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/","name":"The Difference Between Interpreters and Compilers","isPartOf":{"@id":"https:\/\/askanacademic.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/#primaryimage"},"image":{"@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/#primaryimage"},"thumbnailUrl":"https:\/\/askanacademic.com\/wp-content\/uploads\/2019\/01\/computing-and-ict.jpg","datePublished":"2018-06-22T01:44:26+00:00","dateModified":"2019-09-20T14:32:05+00:00","description":"Question distinguish between interpreter and compiler? Answer Both interpreters and compilers are used to translate source code into object code. Although","breadcrumb":{"@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/#primaryimage","url":"https:\/\/askanacademic.com\/wp-content\/uploads\/2019\/01\/computing-and-ict.jpg","contentUrl":"https:\/\/askanacademic.com\/wp-content\/uploads\/2019\/01\/computing-and-ict.jpg","width":1280,"height":835,"caption":"Picture of a data centre"},{"@type":"BreadcrumbList","@id":"https:\/\/askanacademic.com\/computing-and-ict\/the-difference-between-interpreters-and-compilers-944\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/askanacademic.com\/"},{"@type":"ListItem","position":2,"name":"The Difference Between Interpreters and Compilers"}]},{"@type":"WebSite","@id":"https:\/\/askanacademic.com\/#website","url":"https:\/\/askanacademic.com\/","name":"Ask an Academic","description":"Academic Q&A","publisher":{"@id":"https:\/\/askanacademic.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/askanacademic.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/askanacademic.com\/#organization","name":"Ask an Academic","url":"https:\/\/askanacademic.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/askanacademic.com\/#\/schema\/logo\/image\/","url":"https:\/\/askanacademic.com\/wp-content\/uploads\/2019\/01\/aaa-logo.png","contentUrl":"https:\/\/askanacademic.com\/wp-content\/uploads\/2019\/01\/aaa-logo.png","width":1677,"height":1677,"caption":"Ask an Academic"},"image":{"@id":"https:\/\/askanacademic.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Ask-an-Academic-571412300039347\/"]},{"@type":"Person","@id":"https:\/\/askanacademic.com\/#\/schema\/person\/88d510b2a53ef0ce64579418a0c55dde","name":"AskanAcademic.com","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/askanacademic.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/be2c5b73f861f961c4a7fd212308b6a5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/be2c5b73f861f961c4a7fd212308b6a5?s=96&d=mm&r=g","caption":"AskanAcademic.com"},"sameAs":["https:\/\/askanacademic.com"]}]}},"_links":{"self":[{"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/posts\/2417"}],"collection":[{"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/comments?post=2417"}],"version-history":[{"count":0,"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/posts\/2417\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/media\/1932"}],"wp:attachment":[{"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/media?parent=2417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/categories?post=2417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/askanacademic.com\/wp-json\/wp\/v2\/tags?post=2417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}