Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-other / 2007-10

Re: Speed

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

L
Show quoted text 15 lines
>> I hear the Intel C compilers and Fortran compilers and Ada compilers are >> better >> optimized for certain things since FPC/delphi are generally desinged for >> GUI >> programming. ;-) > > C/Fortran yes, Ada no; there exists no Intel Ada compiler. False. There's no speed penalty for writing in Ada vs C. They use the same Gnu compiler back-end, and thus the same assembler-level optimizations. Identical algorithms implemented in the two languages often produce indistinguishable performance. There are cases where an Ada compiler can get better performance than a C compiler, because the Ada compiler has more information to work with.

I assumed that airplanes did not use GNU and that they used some other Ada compiler designed for performance and reliability. I assume that airplanes require more performance over a desktop computer since airplanes are an embedded system. I could be wrong. For example, generally people use freepascal for desktop programming and console programming.. so generally all the fpc bug reports and fixes are based around desktop programming and console programming.. This is what I meant about fpc being more tuned for GUI programming. Anyone who reads into my English more is nitpicking and is taking offense to a fact which is true ;-)

This is why I have always been interested in getting more non-GUI units out there for FPC so that more people would use FPC for different things like server programming, embedded programming. I assume something designed for an embedded systems such as ada would be more geared toward performance, since more people would be reporting compiler problems and bugs for embedded systems.. not GUI programs. Again, anyone who nitpicks me for saying such things is obviously in serious emotional trouble.. because it is a known fact that if your compiler is being used more for GUI programming and more people are reporting bugs/problems for GUI related issues, then the compiler is going to be geared more toward GUI programming.

For example delphi is well known for compiling programs fast... but compiling programs fast means not as many optimizations are neccessarily done since adding optimizations can take time. Since Delphi compiler is geared for RAD, the compiler must be fast and they care not as much about adding optimizations since compile time slows down as you take more time to add optimizations. I could be wrong and the time to add optimizations is almost nil compared to other things that take lots of time like searchpaths/findfile/findppu etc.

Vinzent Höfler
to L: Interesting.. Is the GNU ada compiler certified? L505
Is the GNU ada compiler certified?

Not officially, no, but AFAIR it should at least pass the ACATS test suite, otherwise it wouldn't be allowed to be called an Ada compiler. ;)

But certification, especially in the avionics business, is a different matter anyway, because it always is the final product getting certified. You can get runtimes sort of pre-certified for certain standards (DO178B Level A would be the one for avionics), but just using a certified compiler does not get your final code certified. That's why Ada compilers also have all this verification stuff (things like pragma Inspection_Point) built in. ;)

Proving that the compiler generated the code you intended it to generate is the easiest part of the business. The hard part comes when you're trying to prove that "intended code" equals "correct code".

Vinzent.

Vinzent Höfler
to L: I assumed that airplanes did not use GNU and that they used some other Ada compiler…
I assumed that airplanes did not use GNU and that they used some other Ada compiler designed for performance and reliability.

Well, AdaCore's compiler is not exactly GNU, although basically they maintain the code base for a couple of years now. ;)

I assume that airplanes require more performance over a desktop computer since airplanes are an embedded system. I could be wrong.

You are wrong indeed. As in every real-time system the main concern is not "lightning fast most of the time", but rather "fast enough all of the time".

Lockheed-Martin even uses virtual machines for the C130J flight control system, because that saves them from needing to recertify each runtime again and again. IIRC they talked about deadlines of about 25 ms which are proven to be easily met by the code.

Show quoted text 6 lines
This is why I have always been interested in getting more non-GUI units out there for FPC so that more people would use FPC for different things like server programming, embedded programming. I assume something designed for an embedded systems such as ada would be more geared toward performance, since more people would be reporting compiler problems and bugs for embedded systems.. not GUI programs.

Well, Ada compiled code (even for the GNU one) usually performs "good enough". Subtract (means: turn off) all the runtime checks you get performance equally to that of a state of the art C compiler. If you want to get beyond that, you have to use handcrafted assembler code. ;)

Vinzent.

L
Show quoted text 5 lines
> For example, what do Airplanes use? GNU? Ada compilers must be certified, so if you are developing software for avionics *you have* to write your software with a compiler certified for avionics development. JK

Interesting..

Is the GNU ada compiler certified?

L505