Article View: comp.os.os2.programmer
Article #3Re: REXX COMPILER FOR OS/2
From: Anthony Green
Date: Mon, 26 Oct 1992 10:42
Date: Mon, 26 Oct 1992 10:42
49 lines
2770 bytes
2770 bytes
uunet!csfb1!jbrock writes in article <BwLt7n.CEs@csfb1.fir.fbc.com>: > So I would naively > expect (I don't use OS/2) that compiled code generated by an OS/2 REXX > compiler would run significantly faster than the pre-compiled REXX code > that OS/2 saves in the extended attributes of the source file. Other > posters where argueing that compiling wouldn't buy you much because of > OS/2's pre-compilation, and this is what I was questioning. > > -- > John Brock > uunet!csfb1!jbrock > jbrock@csfb1.fir.fbc.com > I spent quite some time exploring the pros and cons of compiling REXX. This is what it boils down to: Performance improvements derived from compiling REXX depend entirely on the application being compiled. That is to say, the interpreter's source parsing overhead is but a small component of run-time operations that may be executed during the course of running a REXX program. This is compounded by the fact that OS/2's REXX interpreter translates the human readable REXX source into byte-coded machine readable source. REXX is unlike many popular languages in that it is inherently an interpreted language (let's ignore the most obvious case, the INTERPRET command). Almost everything in REXX is dynamic. Typeless symbols are created and destroyed on the fly, flow control may be impossible to determine and scoping is dynamic. This language was not designed with compilation in mind! The run-time overhead for supporting these features is enormous. Opportunities for compiler optimizations are few and far between. Nevertheless, it is possible to write a "well behaved" REXX program that can provide a compiler with many such opportunities. I don't know where IBM gets their numbers from. I don't remember the exact numbers that people are quoting. 2 - 40 times improvement sounds familiar. The important number here is 2. However, I bet it's possible to write code that compiles even worse than that. I would like to see the program that gives them a performance boost of 40. Any upper limit, like 40, is going to be arbitrary. -- Anthony T. Green 343D St. Clair Ave W, Toronto, Ontario M5P 1N3 Home (416) 968-0817 Internet: roboco!green@relay.cs.toronto.edu Office (416) 340-0887 UUCP : ...!uunet!utai!roboco!green
Technical Details
Message-ID:
<720096159snx@roboco.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uunet.ca!unixbox!telly!moore!torsqnt!tmsoft!itcyyz!torag!zooid!roboco!greenReferences:
<BwLt7n.CEs@csfb1.fir.fbc.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uunet.ca!unixbox!telly!moore!torsqnt!tmsoft!itcyyz!torag!zooid!roboco!green From: green@roboco.UUCP (Anthony Green) Newsgroups: comp.os.os2.programmer Subject: Re: REXX COMPILER FOR OS/2 Distribution: world Message-ID: <720096159snx@roboco.UUCP> References: <BwLt7n.CEs@csfb1.fir.fbc.com> Date: Mon, 26 Oct 92 10:42:40 GMT Organization: Ruddock and Associates Lines: 49