[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::languages

Title:Languages
Notice:Speaking In Tongues
Moderator:TLE::TOKLAS::FELDMAN
Created:Sat Jan 25 1986
Last Modified:Wed May 21 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:394
Total number of notes:2683

352.0. "VAX C vs. MACRO-32 Benchmarks" by AVIVA::NEUMAN () Fri Mar 05 1993 09:24

    Is anybody aware of any performance benchmarks comparing VAX C and
    MACRO-32?
    
    -Paul
T.RTitleUserPersonal
Name
DateLines
352.1Why even ask?TLE::JBISHOPFri Mar 05 1993 10:1424
    No, but to be fair you'd have to take account of the extra 
    costs with MACRO:
    
    o	Only runs on VAX and AXP
    
    o	Roughly twice the coding time
    
    o	Far less maintainable
    
    I suspect:
    
    o	the performance of well-coded VAX MACRO is far better
    	than vanilla C (on VAX only);
    
    o	that good C coding practices can make up some of the
    	difference;
    
    o	that poorly-coded MACRO is no better than vanilla C
    	and often slower;
    
    o	and that considering commercial reality, you'd have to
    	be nuts to go with MACRO for new development.
    
    		-John Bishop
352.2Customers Have Strange RequestsAVIVA::NEUMANMon Mar 08 1993 08:415
    Thanks,  I agree completely but I've a customer asking.  We're working
    on convincing them its ok to go from macro to C. But they're concerned
    about losing the perceived performance advantage of macro if they go
    to a common codebase (C) on VAX and AXP.
     
352.3personal anecdoteMARX::GRIERmjg's holistic computing agencyMon Mar 08 1993 11:5227
Re: .0,.1,.2:

   My favorite example to use in this case is a common code fragment in our
system which is an object-oriented runtime environment for dispatching method
invocations.  The dispatch is a little more complicated than in a language
like C++ where a pointer to a function can just be de-referenced; we have to
lock access to the object [it's a multi-threaded runtime environment] and
fault the object definition and value into memory if they're not already
there, perform security access checks if the client has the rights to invoke the
object's method, and then finally call the actual method.

   As you can imagine, it's something of a bottleneck, so I decided to hand-
optimize the code that VAX C generated for the routine. In every single way I
could quantitatively measure before execution, the code sequence I came up with
was better -- fewer memory references, fewer registers used (and therefore saved
in the procedure entry mask) fewer instructions.

   However, it ran three times longer than the VAX C-generated code.  (The C
code dispatched 40,000 messages per second, the hand generated code did a little
over 10,000 as I recall.)

   That was my last foray into hand-generated MACRO code.  I love knowing what's
going on at the lower levels, but on a VAX processor, alignment must be big
magic which I doubt a human can manage as well as the VAX C compiler/VCG.  Not
to mention the portability and maintenance benefits of a higher level language.

						-mjg
352.4Sorry about spelling ...ESBS01::WATSONSTICK 1: A boomerang that doesn't workTue Mar 09 1993 04:3819
    Although not VAX-C this may also be of help.
    
    Sone time age (OK a long time ago) whilst working for Systems Designers
    here in the UK we were asked to run a benchmark through our VAX
    Coral-66� to compare with the handcoded ``You'll never beat it'' piece
    of Macro.
    
    We were 25% faster.
    
    In general I would be _very_ suprized if anyone could generate Macro
    which was substantially faster that that generated by a resonable
    quality compiler - for any reasonable sized code fragment.
    
    	Rik.
    
    PS The optimizer on this compiler wasn't even particulally good.
    
    �A structured 'ish programming language similar to C in cabability /
    complexity.