[Gloucs] How much faster is assembly language

Bob Wilkinson rwilkinson at messagelabs.com
Tue Sep 20 17:32:38 UTC 2011


On Mon, Sep 19, 2011 at 06:13:43PM +0100, Tom Llewelyn wrote:
> On 19 September 2011 17:41, Bob Wilkinson <rwilkinson at messagelabs.com>wrote:
> 
> > On Mon, Sep 19, 2011 at 03:02:09PM +0100, Gerd Busker wrote:
> > > On 19/09/2011 14:52, Bob Wilkinson wrote:
> >
> > bob at poland:~/src/problems_for_computer_solution/07_armstrong_numbers$
> > time perl armstrong_big.pl
> >
> > real    0m6.192s
> >
> > bob at poland:~/src/problems_for_computer_solution/07_armstrong_numbers$
> > time ./armstrong_big_string
> >
> > real    0m3.303s
> >
> > bob at poland:~/src/problems_for_computer_solution/07_armstrong_numbers$
> > time ./armstrong_big_macro
> >
> > real    0m0.044s
> >
> 
> Those numbers are incredible!  I can understand that perl would be
> relatively slow given that it's interpreted, but to have a fairly simple
> looking bit of C code take 75 times as long?! Have you run a disassembler on
> the C binary?
> 
> Tom

I had a quick step through and could not see anything obviously
unusual. I do note that when I run it from the command line that the
assembly language feels much faster.

Bob

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the gloucs mailing list