Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10771
| From | Gelonida N <gelonida@gmail.com> |
|---|---|
| Subject | Re: Early binding as an option |
| Date | 2011-08-03 00:54 +0200 |
| References | <CAPTjJmpWN1Tq-46UoHjh_-q9ahkivTWmLJR3_eF9iThHwXQnhA@mail.gmail.com> <j19mbp$985$1@dough.gmane.org> <CAPTjJmr8mjYKTYu9EdKc-QRaFfSwH0rbVdAhnW-ysfvOZujJqQ@mail.gmail.com> <j19t8g$jqa$1@dough.gmane.org> <CAPTjJmo9r1RggHG5JaB7XbDM0y-bCmaYWfnO5vMjKhSoF+DTHA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1810.1312325666.1164.python-list@python.org> (permalink) |
On 08/03/2011 12:26 AM, Chris Angelico wrote: > On Tue, Aug 2, 2011 at 11:21 PM, Gelonida N <gelonida@gmail.com> wrote: >> On the other hand: It might be interesting, that the early binding would >> just take place when python is invoked with -O >> > > This could be an excellent safety catch, but on the other hand, it > might destroy all value of the feature - once again, it would be > optimizing in the sole case where the code is probably better > rewritten in C. > > Or would this be a sort of "half-way house" - this is where we need > more performance, let's spend two minutes tweaking it in Python rather > than dropping to C - to get some of the performance gains? Not really sure. I would guess, that really tight inner loops should be rewritten with Cython (never tried it though) or in C if performance is really that critical. On the other hand it could be nice to get a certain performance increase with some pragmas without rendering the code completely unreadable. I have loads of places in my code, where name lookups were required only at compile time or at the first time when code is executed. For every consecutive call a cached object-reference could be used.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Early binding as an option Gelonida N <gelonida@gmail.com> - 2011-08-03 00:54 +0200
csiph-web