From: geremy condra on 25 Jun 2010 20:08 On Fri, Jun 25, 2010 at 6:18 PM, Mark Lawrence <breamoreboy(a)yahoo.co.uk> wrote: > On 25/06/2010 22:25, Stephen Hansen wrote: >> >> On Fri, Jun 25, 2010 at 1:51 PM, Mark >> Lawrence<breamoreboy(a)yahoo.co.uk>wrote: >> >>> On 25/06/2010 16:34, Stephen Hansen wrote: >>> >>> Python's slow, sure. But its in practice fast enough for an extremely >>>> >>>> broad >>>> range of activities. >>>> >>>> >>> What? >>> >> >> What, what? >> >> --S >> >> > > Python is *NOT* slow, you can develop software in it much faster than you > can in some other languages. The run time speed has also been shown to be > faster in some circumstance than C because of the Bots who're smart enough > to optimise it up to the hilt. CPython is written in C. By definition it cannot go faster than C, and extensive practice bears this out- the stdlib is full of modules either written or rewritten in C for speed, not to mention numpy, sage, etc. I'd also like to see the example you cite- I have written Haskell that runs faster than C, and Forth that runs faster than C, and I consider myself reasonably proficient at Python and have *never* seen Python code that executes faster than comparably optimized C. Geremy Condra
From: Nobody on 26 Jun 2010 07:11 On Fri, 25 Jun 2010 20:08:27 -0400, geremy condra wrote: > I have written Haskell that runs faster than C, and Forth that runs > faster than C, Faster than *what* C, though? With Haskell, there's seldom a significant performance hit for using -fvia-C, so you would probably have been able to get comparable performance using C. The most common reason for Haskell to outperform C is due to lazy evaluation, i.e. the C code evaluates things which it doesn't actually need to.
From: geremy condra on 26 Jun 2010 07:55 On Sat, Jun 26, 2010 at 7:11 AM, Nobody <nobody(a)nowhere.com> wrote: > On Fri, 25 Jun 2010 20:08:27 -0400, geremy condra wrote: > >> I have written Haskell that runs faster than C, and Forth that runs >> faster than C, > > Faster than *what* C, though? Well, than the C it was replacing, which is admittedly not much of a claim. Having said that, it's a claim I can't make about Python, which was why I brought it up in the first place. > With Haskell, there's seldom a significant performance hit for using > -fvia-C, so you would probably have been able to get comparable > performance using C. Probably eventually, but not without some fairly substantial work on a section of code that was already pretty fast. Geremy Condra
First
|
Prev
|
Pages: 1 2 Prev: Why Is Escaping Data Considered So Magical? Next: Python 2.7, tkinter problem on OSX |