| iMatix home page
| Libero home page | Libero documentation
| << | < | > | >>
Libero Libero
Version 2.32

Efficiency

Efficiency of The Generated Code

People sometimes ask of Libero: "But does it produce efficient programs?". Bad grammar apart, this question gets a considered answer. Usually I say: "What do you mean by 'efficient'?", or "Does a hammer build a solid table?". I have a practical definition of 'efficient': if a program is easy to write, easy to maintain, does the job on time, and no-one has trouble with it, it's efficient. It's also unusual, but that is another soap-box.

When I wrote Libero, my true goal was to make programming easier and safer, whatever the language. This also gives me a convenient stock answer: if you write a program using Libero, and you find that it runs too slowly, you can rewrite it in a faster language quickly and cheaply.

Efficiency of The Dialog

First of all, the size of a dialog has only a slight relationship to the speed of the program. A very large program will load and maybe run slower than a small one, but the program has to be a lot larger.

Secondly, adding a new state, event, or action module will make the generated code larger. If a dialog has 10 states, then a new event will add 20 words to the program size. If a dialog has 50 states, then a new event will add 100 words. A dialog with 100 states and 100 events will use a whopping 20,000 words of storage for its main tables. It is possible to compress large FSM tables, but I never had a problem that was so complex that it was worth it. It is a function that one could add to Libero in the future. However, a program this complex is likely to be several tens of thousands of lines long.

So, I generally tell people: if you make your dialog smaller, do it because it is better design, not because it is more efficient.


| << | < | > | >>
| Using Libero | The Dialog File Syntax | Libero Options | Using Exceptions | Using The Defaults State | Using Sub-Dialogs | Using Super-States | Using Templates | Using Get-External-Event | Efficiency | Care and Feeding of Dialogs | When To Use Libero
iMatix
Copyright © 1996-97 iMatix