Mumpster http://mumpster.org/ |
|
Unit 1 - Lesson 2: Compiled vs. Interpreted MUMPS Systems http://mumpster.org/viewtopic.php?f=29&t=708 |
Page 1 of 1 |
Author: | tlwiechmann [ Wed May 18, 2011 4:57 pm ] |
Post subject: | Unit 1 - Lesson 2: Compiled vs. Interpreted MUMPS Systems |
First, it is important to understand the concepts of compiled verses interpreted systems. Fully compiled systems require the programmer to write source code, typically in modules. The source code is then compiled into object code. Object code consist of code that will actually run on the underlying hardware once it is linked. Because the code is usually broken up into modules, it is then linked together to form the executable. The executable is the part that actually runs on the target machine. Typically (not always today), the compiler approach assumes the source code to be static (unchangeable) as opposed to dynamic (changeable) at runtime. Originally, the compiled approach has been preferred because it gave a considerable performance advantages over other approaches. On the other end of the spectrum is the fully interpreted system. It assumes that the source code can be dynamic. That is, code can change and it needs to be interpreted at runtime simply because the outcome will be different. This is a powerful feature of interpreted systems since not all scenarios can be anticipated at compile time. However, this feature was often offset by the fact that strictly interpreted systems were slower than fully compiled systems. The MUMPS language was designed to be interpreted. In fact all of the original systems were strictly interpreted such as DSM-11. Why? MUMPS was originally written as a language to implement medical record systems. Medical computing can be complex and require a system that could handle changeable scenarios at runtime. Consequently, the language was designed to handle this through the concept of indirection. You will learn more about the various forms of indirection towards the end of this course and more completely in the MUMPS Programming II course. It is an incredibly powerful aspect of the MUMPS language. Systems like File Manager and EsiObjects would have been extremely difficult to implement without it. As the field of computer science evolved, it became obvious that you could have both dynamic and speed of execution at runtime. Hence, the intermediate approach, or more technically known as p-code (precompiled or pseudo-code) generation, was used to implement more modern systems. This approach would compile the source code into an intermediate language (object code) that was then interpreted. The compilation process removed the problems of a fully interpreted system. What were some of the features of a strictly interpreted system that contributed to its slower performance? Here are a couple:
Those MUMPS systems that thrived were either originally written using p-code generation or they were evolved to replace the strictly interpreted approach. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |