Performance

From Liberty Eiffel Wiki
Revision as of 19:01, 19 November 2005 by SEWikiImport Pini (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Very High Performance Programs

Eiffel is a beautiful method and language, based on strong and elegant principles. But, which interest (except intellectual pleasure) could you find in using a wonderful language with poor performance on programs you can write?

Hopefully, Eiffel has been designed with performance in mind. Furthermore, the SmartEiffel compiler and the associated libraries are designed with strong thoughts in order to associate performance and expressivity.

In Eiffel language, expressivity is in the power of concepts. For example multiple inheritance and genericity are very powerfull concepts, as are static type and dynamic type. This means that properly designed programs will be made with small code, this is global code compacity. On the opposite, there is no local code compacity. Eiffel spirit is to put as much readability as possible in your code, because it is written once and read many times (code is designed for changes and reuse). So there is no interest in using many unreadable abreviations or symbols in order to save some keystrokes. Of course Eiffel code with standard formatting rules needs many lines where other languages only need one line. The purpose is just readability because it's a prerequisite for code maintenance and reuse.

To convince you, I'll just give one example:

1000[p]s2[lip/dli%0=1dvsr]s12sid2%0=13sidvsr[dli%0=1lrli2+dsi!>.]ds.xd1<2

I wish good luck to any body who wants to understand this program in dc language, reuse it, improve it or anything else. For the currious, you can run dc on any UNIX-like system and paste this code, this will print the prime number decomposition of the first value which is 1000 here. How to know the principles used here? Does the algorithm search from 2 each time? Does the program stop when the square root has been reached?

Now, back on the performance aspect, you can see how SmartEiffel behaves on this site[1] (where code lines count are ignored because it's not a relevant design aspect as shown above).

SmartEiffel generates highly efficient code, isn't it? In fact, we have many ideas for improving generated code. This mean you can choose SmartEiffel now and expect even better speed of your code using future releases of the compiler!

The mains improvements areas are generated code for dynamic linking, flow analysis and garbage collector. Of course, these projects will be much helped if they are funds based.