[oclug] Programming wars -- great fun.
Michael P. Soulier
msoulier at storm.ca
Fri Apr 6 16:47:31 EDT 2001
Hey Dan,
On Fri, Apr 06, 2001 at 04:14:46PM -0400, Dan York wrote:
> Since I know you're on the OPAG list, too.... perhaps you should
> flesh out your offerings and do a python one next time in addition
> to the others! ;-) (You don't need to actually do your *job*,
> do you? ;-)
I know Perl better, so my initial answer was Perl. :) Then I thought, "how
would I do this in C?" That didn't leave any time for Python. C took too long,
and I'm too rusty. Not to mention that Python is still pretty new to me. I've
only written 2 things in it so far here at work, one of which I posted as an
exercise to the OPAG list. Will I be seeing a solution from you Dan? ;-)
The python ones probably could have been sped up by writing a thin wrapper
around the bulk of the code and importing it, so that in subsequent runs it
was already compiled. Not sure though, for something this size. The best
optimization would be to run the freeze tool on it and compile it. You should
try that and report on the speed increase. Perlcc on the Perl code for
comparison would be cool too.
I'm actually surprised at how slow the Python ones were. I've done some
benchmarking on the basic types and found Python faster, but Perl probably has
a thinner API layer making it faster for these kind of disk operations. Mind
you, if I really wanted to demonstrate slow, I'd write it in Java. ;-)
I would have loved to see a fully working Bourne shell offering, just for
hacker value.
Mike
--
Michael P. Soulier <msoulier at storm.ca>
"With sufficient thrust, pigs fly just fine. However, this is not necessarily a
good idea. It is hard to be sure where they are going to land, and it could be
dangerous sitting under them as they fly overhead." -- RFC 1925
More information about the OCLUG
mailing list