🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.intel
Article #1884

Re: function start address allignment

#1884
From: Rick Richardson
Date: Fri, 03 Mar 1989 15:00
20 lines
1532 bytes
In article <795@microsoft.UUCP> philba@microsoft.UUCP (Phil Barrett) writes:
>
>Actually, I believe the reason is performance. The 386 needs to have fetched
>the entire instruction before it can begin execution of it.  By aligning
>the target of a control transfer, you can minimize the number of DWord fetches
>required to start execution of the instruction and thus improve the performance
>of your program.

Except that instructions can be a short as one byte, and most functions
will start off with a "pushl" which is one byte.  In tests I've
run, the performance differences vary.  With a cache, unaligned
is very slightly faster than aligned.  Without a cache, aligned
is slighty faster than unaligned.  The speed difference is less
than 1% in any case.

-- 
Rick Richardson | JetRoff "di"-troff to LaserJet Postprocessor|uunet!pcrat!dry2
PC Research,Inc.| Mail: uunet!pcrat!jetroff; For anon uucp do:|for Dhrystone 2
uunet!pcrat!rick| uucp jetroff!~jetuucp/file_list ~nuucp/.    |submission forms.
jetroff Wk2200-0300,Sa,Su ACU {2400,PEP} 12013898963 "" \d\r\d ogin: jetuucp
Technical Details
Message-ID: <690@pcrat.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!pcrat!rick
References: <311@ssp2.idca.tds.philips.nl> <687@pcrat.UUCP> <795@microsoft.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!pcrat!rick
From: rick@pcrat.UUCP (Rick Richardson)
Newsgroups: comp.sys.intel
Subject: Re: function start address allignment
Keywords: word alignment
Message-ID: <690@pcrat.UUCP>
Date: 3 Mar 89 15:00:42 GMT
References: <311@ssp2.idca.tds.philips.nl> <687@pcrat.UUCP> <795@microsoft.UUCP>
Reply-To: rick@pcrat.UUCP (Rick Richardson)
Organization: PC Research, Inc., Tinton Falls, NJ
Lines: 20