Re: High Level Language vs Assembly

"T.Shackell" <ts3@ukc.ac.uk>
1 Mar 2001 02:38:42 -0500

          From comp.compilers

Related articles
[8 earlier articles]
Re: High Level Language vs Assembly rhyde@transdimension.com (Randall Hyde) (2001-02-25)
Re: High Level Language vs Assembly max@max.mcs.gac.edu (Max Hailperin) (2001-02-25)
Re: High Level Language vs Assembly jacob@jacob.remcomp.fr (jacob navia) (2001-02-25)
Re: High Level Language vs Assembly tej@melbpc.org.au (Tim Josling) (2001-02-25)
Re: High Level Language vs Assembly henry@spsystems.net (2001-02-25)
Re: High Level Language vs Assembly fjh@cs.mu.OZ.AU (2001-02-25)
Re: High Level Language vs Assembly ts3@ukc.ac.uk (T.Shackell) (2001-03-01)
Re: High Level Language vs Assembly samiam@cisco.com (Scott Moore) (2001-03-01)
Re: High Level Language vs Assembly samiam@cisco.com (Scott Moore) (2001-03-04)
Re: High Level Language vs Assembly sunni@speakeasy.net (Shankar Unni) (2001-03-04)
Re: High Level Language vs Assembly ts3@ukc.ac.uk (T.Shackell) (2001-03-08)
Re: High Level Language vs Assembly kszabo@nortelnetworks.com (Kevin Szabo) (2001-03-08)
Re: High Level Language vs Assembly tfjellstrom@home.com (Tom Fjellstrom) (2001-03-10)
[10 later articles]
| List of all articles for this month |
From: "T.Shackell" <ts3@ukc.ac.uk>
Newsgroups: comp.compilers
Date: 1 Mar 2001 02:38:42 -0500
Organization: University of Kent at Canterbury
References: 01-02-094 01-02-101
Keywords: assembler, performance
Posted-Date: 01 Mar 2001 02:38:41 EST

I think to discard ASM entirely is foolish as it does have it's uses,
certainly it is not sensible to write a large project in ASM or even a
small one, but careful use of ASM can give considerable performance
benefits.


For example I not so long ago wrote a real-time 3D graphics engine
from a 2D platform, I quickly found I couldn't get all the performance
I wanted using C alone and I knew I was using the best (known)
algorithms. When I dropped the inner loop of the rasterizer into ASM
and carefully hand optimized it I found I got a performance increase
of around 120%. I think the key was I was only trying to hand-code
less than 10 lines of C in a loop the CPU was in 95% of the time.


But certainly always look for the algorithm improvement first if it's
still not fast enough then think about using assembler.


Tom Shackell


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.