Autor Beitrag
Andy77
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 17



BeitragVerfasst: Mo 21.08.06 19:39 
Hallo zusammen,

ich habe ein relativ umfangreiches Simulationstool geschrieben, was mir aber allmählich zu langsam wird.
Der Delphicompiler ist ja nicht wirklich in der Lage, bei Fließkommaberechnungen optimalen Code zu erzeugen. Wenn man Irgendwelche Berechnung auf einem Fließkomma-Array durchführt, werden z.B. mehrmals pro Zeile
mov ax,[bp+xxx]
mov dx,[bp+yy]
aufgerufen, ohne daß sich je etwas an AX oder DX ändert. Zumindest das kann man die ja wegoptimieren.

Kennt jemand einen optimierten Compiler oder vielleicht auch nur einen Patch, der die überflüssigen Befehle aus der erzeugten EXE rauskillt ?

Gruß,
Andreas
nullplan001
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 212

Win 2000 Professional, Debian Linux 4.0 (Etch,Stable)
Pascal (FreePascal 2.0.2, TurboPascal 7.0), C(++) (G++/GCC 3.4.2 + MinGW), Java (JDK 1.5.0_07), PHP (PHP 5.1.4)
BeitragVerfasst: Di 22.08.06 11:31 
Ja, hol dir doch einfach FreePascal und lass es im Delphi-Kompatibilitätsmodus auf die Projekthauptdatei los. Und stelle vorher auf Level-3-Optimierungen und Prozessor-Spezifische Optimierungen (Bei einem Athlon K6 kann man mehr machen als bei einem 80386). Ich würde folgende Befehlszeile für Debugging empfehlen:
ausblenden Quelltext
1:
ppc386 -bl -Cit -gcdghlvw -OGru3p3 -Rintel -Sdghit -Twin32 -CfSSE2 -venhiw projektdatei					

Für Release würde ich die Debugging-Infos rausnehmen (-g..., -bl). Ach guck dir einfach fpc -? an, und du findest schon, was du suchst. Achso, 'n Link: Bitte sehr.
Tschö,
nullplan

_________________
Ich fahr' nicht selber, weil ich festgestellt habe: ich fahre zu emotional. Bin 180 gefahren wo 30 erlaubt war... -- Jürgen von der Lippe
Andy77 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 17



BeitragVerfasst: Di 22.08.06 22:59 
erstmal vielen Dank für den Link.
Habs mal installiert. Der ASM-Code sieht schon einiges effizienter aus als der vom Delphi-Compiler, die letzten 5% kann man aber scheinbar doch noch von Hand holen.
Kann man mit Free Pascal eigentlich auch ein paar Units kompilieren und dann in das Gesamtprojekt unter Delphi einbinden !?
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Di 22.08.06 23:11 
Zumindest über DLL's kannst du mit beiden programmieren, nur immer schön Standardcalls machen ;-)