Python speed vs csharp
staschuk at telusplanet.net
Thu Jul 31 13:18:03 CEST 2003
[a number-crunching hotspot benchmarks at 210s in Python]
> translated it to C and ran it. The C code runs in approximately 7.5
> seconds. That's compelling, but C isn't: part of my simulation includes a
> parser to read an input file. I put that together in a few minutes in
> Python, but there are no corresponding string or regex libraries with my C
> compiler, so converting my Python code would take far more time than I'd
> save during the resulting simulations.
It seems you're speaking here as if the options are a pure-Python
program and a pure-C program. Is there a reason you can't move
just this one hotspot function out to C, leaving the parser etc.
Steven Taschuk staschuk at telusplanet.net
"Telekinesis would be worth patenting." -- James Gleick
More information about the Python-list