# Ruby has to be interpreted line by line in runtime, does this affect Ruby's execution efficiency ba

**URL:** <https://www.ruby-forum.com/t/ruby-has-to-be-interpreted-line-by-line-in-runtime-does-this-affect-rubys-execution-efficiency-ba/136761>\
**Category:** Ruby\
**Created:** [May 6, 2008, 6:36am UTC](https://www.ruby-forum.com/t/ruby-has-to-be-interpreted-line-by-line-in-runtime-does-this-affect-rubys-execution-efficiency-ba/136761 "2008-05-06T06:36:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erwin\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/35a633/32.png) [@Erwin\_M](https://www.ruby-forum.com/u/Erwin_M)\
**Post date:** [May 6, 2008, 6:36am UTC](https://www.ruby-forum.com/t/ruby-has-to-be-interpreted-line-by-line-in-runtime-does-this-affect-rubys-execution-efficiency-ba/136761/1 "2008-05-06T06:36:12Z")

</div>

Why doesn’t the inventor design a better approach to avoid this  
problem?

---

<div class="post-metadata">

**Author:** ![Erwin\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/35a633/32.png) [@Erwin\_M](https://www.ruby-forum.com/u/Erwin_M)\
**Post date:** [May 6, 2008, 6:42am UTC](https://www.ruby-forum.com/t/ruby-has-to-be-interpreted-line-by-line-in-runtime-does-this-affect-rubys-execution-efficiency-ba/136761/2 "2008-05-06T06:42:38Z")

</div>

On May 5, 2008, at 10:35 PM, Erwin M. wrote:

> Why doesn’t the inventor design a better approach to avoid this  
> problem?

cat a.rb | ssh remote ruby

a @ [http://codeforpeople.com/](http://codeforpeople.com/)

---

<div class="post-metadata">

**Author:** ![Erwin\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/35a633/32.png) [@Erwin\_M](https://www.ruby-forum.com/u/Erwin_M)\
**Post date:** [May 6, 2008, 8:56am UTC](https://www.ruby-forum.com/t/ruby-has-to-be-interpreted-line-by-line-in-runtime-does-this-affect-rubys-execution-efficiency-ba/136761/3 "2008-05-06T08:56:41Z")

</div>

> Ruby has to be interpreted line by line in runtime

This is not true.

robert

---

<div class="post-metadata">

**Author:** ![Erwin\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/35a633/32.png) [@Erwin\_M](https://www.ruby-forum.com/u/Erwin_M)\
**Post date:** [May 6, 2008, 9:15am UTC](https://www.ruby-forum.com/t/ruby-has-to-be-interpreted-line-by-line-in-runtime-does-this-affect-rubys-execution-efficiency-ba/136761/4 "2008-05-06T09:15:07Z")

</div>

Most advanced “scripted” languages (Ruby included) are parsed into  
ASTs and then excuted.  
This is unlike say, MIRC-Script or BASH, which _are_ executed  
line-by-line.  
Now, I’m not arguing that Ruby is fast, by any means, just that it  
isn’t run in a simplistic line-by-line parse-execute style.  
(Of course I’m talking about .rb files, not IRB, which is, well,  
rather “interactive”.)
