in reply to Re: Is Perl right for me?
in thread Is Perl right for me?

I would suggest that for most problems a good compiled language (Fortran compilers have beaten very skilled assembly language programmers for about 40 years; I see little reason why C/C++ wouldn't do as well) will beat even the best hand-coded assembler for many classes of problems

Are you making the claim about assembler for programming time or for run time ? Or size ?

If run time and/or size...

Code generation has become better and better. Processors have become better at supporting code generators. Processors have become more complex, so that to get the most out of them you need to worry about the relationship between instructions -- instruction scheduling is hard work for the average human. So these days it's effectively impossible to cost justify assembler vs C -- cycles and RAM are cheap and plentiful, and next year even cheaper and more plentiful.

I suppose with specialist vector processors and such, even FORTRAN could out-instruction-schedule a human. I've no experience with such heavy duty scientific iron.

However, as a bare-knuckle assembler black-belt, I'd have been flabbergasted not to be able to out-run a compiler 20 years ago, let alone 40. I don't want to start an OT religious war... but I must ask if you have evidence for your assertions ?

Does anyone have a section of code that is so time critical it's worth casting into assembler ? I have a hankering to go mano-a-mano with some real code !

Replies are listed 'Best First'.
Re^3: Is Perl right for me?
by swampyankee (Parson) on Jan 14, 2009 at 17:42 UTC

    It's anecdotal, or at least I've never seen the documentation of the performance of FORTRAN1 vs assembler; I suspect that it was on IBM platforms, for code fragments, when John Backus was still active.

    On the other hand, it is, inarguably, more portable than assembler. I even have a good story about that ;-).


    1  Also, it's no longer FORTRAN; this was changed in the Fortran 90 standard.


    Information about American English usage here and here. Floating point issues? Please read this before posting. — emc

      Oh, Inline::C I love Perl now ^^
      All the functions of C and Perl. As for speed I think Perl is just fine.
      But you are right, I'll just install perl on my Laptop and'll start coding some small Math programs to get the hang of it.
      If I decide I don't like it I'll shuck it out.