[Tutor] Has anyone ever tried to convert the textual output ofthe dis module to another language

Alan Gauld alan.gauld at freenet.co.uk
Mon Apr 18 01:25:47 CEST 2005


Sorry to be picky but...

> Witness gcc -- the C language has been around for 30 years, the most
> widely used for 20,

Depends how you define 'most widely used' I guess but the language
with
most code and the most programming jobs is still COBOL(*) by a long
margin.
And going by jobs Java overtook C/C++(combined) a couple of years
ago...
Pure C hasn't been number one at any point in its existence. But it
does depend on how you measure, if you are talking about the number
of platforms it supports then I suspect C wins.

> the gcc effort is at least 15 years old,

At least, I suspect closer to 20. I've been using gcc for 14 and it
was
mature even then (maybe even at version 2!).

> they're still finding ways to make it spit out faster code...

But that's not hard. gcc is a great compiler in many ways but
speed of final code has never been one of them - which is why
Sun, HP, IBM, Borland, Watcom etc can still charge big bucks
for their optimised compilers. The one I know best - from
Sun - is usually 10-30% faster than gcc in final code speed.
But then, who knows better how to optimise for a Sun Sparc
chip than Sun... And at $2000 per copy they can afford the
research. (And we can afford exactly one copy, used for the
final compile! :-)

> Which leads me to my next point: if you want your Python program to
be
> faster, rewrite the speed-critical parts (there aren't that many of
> them) in C.

And that's the real nub, Python is a great scripting language,
where you need C speed - use C!

Alan G.

(*)Remember that most of the really big projects - with several
hundreds of coders - tend to be corporate business applications built
for mainframes - nearly all done in COBOL! If each of the Fortune 500
companies has an average of 10 big projects each with 200 programmers
(not that many on really big job) that's 2000x500 = 1 million COBOL
coders,
not counting the many thousands working on maintaining old legacy
code.




More information about the Tutor mailing list