Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71887
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2014-05-22 06:43 -0700 |
| References | <mailman.10217.1400756071.18130.python-list@python.org> |
| Message-ID | <8848706d-405b-482e-8fba-4470e903ba02@googlegroups.com> (permalink) |
| Subject | Re: Python is horribly slow compared to bash!! |
| From | wxjmfauth@gmail.com |
Le jeudi 22 mai 2014 12:54:22 UTC+2, Chris Angelico a écrit :
> Figure some of you folks might enjoy this. Look how horrible Python
>
> performance is!
>
>
>
> http://thedailywtf.com/Articles/Best-of-Email-Brains,-Security,-Robots,-and-a-Risky-Click.aspx
>
>
>
> Actually, probably a lot of you folks already read TDWTF, but maybe
>
> some don't (yet).
>
>
>
> ChrisA
=========
=========
>>> timeit.repeat("(x*1000 + y)[:-1]", setup="x = 'abc'; y = 'z'")
[1.4027834829454946, 1.38714224331963, 1.3822586635296261]
>>> timeit.repeat("(x*1000 + y)[:-1]", setup="x = 'abc'; y = '\u0fce'")
[5.462776291480395, 5.4479432055423445, 5.447874284053398]
Na, na, na, I win.
But that's peanuts.
I can make an application running 100 times slower just
by replacing 'z' with Dutch characters. [*]. I win again.
I can take the same application and replace 'z' by ..., and
... No, I do not win :-( . Python fails.
[*] Unicode is fascinating, working with it is a little
bit travelling.
jmf
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python is horribly slow compared to bash!! Chris Angelico <rosuav@gmail.com> - 2014-05-22 20:54 +1000
Re: Python is horribly slow compared to bash!! wxjmfauth@gmail.com - 2014-05-22 06:43 -0700
Re: Python is horribly slow compared to bash!! Johannes Bauer <dfnsonfsduifb@gmx.de> - 2014-05-26 19:00 +0200
Re: Python is horribly slow compared to bash!! Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-26 19:19 -0400
Re: Python is horribly slow compared to bash!! Grant Edwards <invalid@invalid.invalid> - 2014-05-27 14:12 +0000
Re: Python is horribly slow compared to bash!! Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-27 20:26 -0400
Re: Python is horribly slow compared to bash!! Mark H Harris <harrismh777@gmail.com> - 2014-05-22 14:17 -0500
csiph-web