Article View: comp.lang.pascal.delphi.misc
Article #526Re: Performance - DOS mode contra GUI .
From: Bj�rge S�ther
Date: Fri, 18 Aug 2000 00:00
Date: Fri, 18 Aug 2000 00:00
33 lines
2481 bytes
2481 bytes
"Klaus J. Koch" <klaus@mdi.mr.he.schule.de> skrev i melding news:7k26wEf91hB@klaus.mr.he.schule.de... > Eddy Vluggen wrote: > > The guys at Borland who write the > compilers know what code to generate to obtain fastest executables. Well, almost... Look for a thread in this NG a few months ago on a small design flaw in TList.Get method in versions 2-4 that made it take 200% longer than needed. But generally, I agree. > The other day I spent my time to convert 3 lines of pascal code into > more than 50 lines of highly optimized assembler code avoiding slow > commands as loops, jumps, calls, and pushs, and it ended up in > taking 5 per cent _more_ cpu time than the compiler generated code. You're good at it. I typically ended up with some 10-20%...;-) > A hint that hasn't been given yet might be helpful: > sometimes you often have to call a function that takes a lot of time. > If there are only a small amount of values that are passed to that > function then you can precalculate all the results and store them > in an array to fetch them when needed. > That's what a pentium does internally when executing a DIV instruction. Before anyone can give some useful advice, get a profiler, and locate the stuff that spends 90% of the time. Then post snippets of this code, and someone may provide help. -- Bjoerge Saether Consultant / Developer Asker, Norway bsaether.removethis@online.no (remove the obvious)
Technical Details
Message-ID:
<Uf6n5.5418$By6.90557@news1.online.no>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<u8mm5.822$0L1.13011@news010.worldonline.dk><399b304d$0$1695@heracles> <7k26wEf91hB@klaus.mr.he.schule.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1091e5,8b5ff9f09340286e X-Google-Attributes: gid1091e5,public X-Google-Thread: fd817,8b5ff9f09340286e X-Google-Attributes: gidfd817,public X-Google-Thread: 10baee,8b5ff9f09340286e X-Google-Attributes: gid10baee,public From: "Bj�rge S�ther" <REMOVE_bsaether@THIS_online.no> Subject: Re: Performance - DOS mode contra GUI . Date: 2000/08/18 Message-ID: <Uf6n5.5418$By6.90557@news1.online.no> X-Deja-AN: 659650813 References: <u8mm5.822$0L1.13011@news010.worldonline.dk><399b304d$0$1695@heracles> <7k26wEf91hB@klaus.mr.he.schule.de> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Complaints-To: news-abuse@online.no X-Trace: news1.online.no 966586484 130.67.10.41 (Fri, 18 Aug 2000 10:14:44 MET DST) Organization: Telenor Online Public Access X-MSMail-Priority: Normal NNTP-Posting-Date: Fri, 18 Aug 2000 10:14:44 MET DST Newsgroups: comp.lang.pascal.delphi.misc,alt.comp.lang.borland-delphi,borland.public.delphi.winapi