Re: [python-189] Python performance anti-patterns

From: Michael H.
Sent on: Thursday, January 10, 2013 8:21 PM
I should have mentioned that its the fastbinary component, which is required for real-world production use of Cassandra.

Am I doing it wrong?

(64d906d991dd7399)Alexs-MacBook-Pro-2:64d906d991dd7399 alex_gaynor$ python
Python 2.7.2 (341e1e3821ff, Jun[masked], 15:42:54)
[PyPy 1.9.0 with GCC 4.2.1] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``All exceptblocks seem sane.''
>>>> import thrift
>>>> 

Alex


On Thu, Jan 10, 2013 at 3:32 PM, Michael Hood <[address removed]> wrote:
I think it was pretty clear that is a CPython-specific concern.

Some of us can't imagine not being able to say, import thrift. :)


On Jan 10, 2013, at 12:34 PM, Alex Gaynor <[address removed]> wrote:

I really cannot imagine anything less import than dict() vs. {}:

Alexs-MacBook-Pro-2:pypy alex_gaynor$ ./pypy-c -mtimeit "dict()"
[masked] loops, best of 3:[masked] usec per loop
Alexs-MacBook-Pro-2:pypy alex_gaynor$ ./pypy-c -mtimeit "{}"
[masked] loops, best of 3:[masked] usec per loop

Alex


On Thu, Jan 10, 2013 at 12:21 PM, Hy Carrel <[address removed]> wrote:
Here is a nice article supporting Nam's suggestion, at least for CPython <= 2.7


Hy

On Jan 9, 2013, at 10:10 AM, Nam Nguyen <[address removed]> wrote:

Using ``dict()`` for what the literal ``{}`` can do seems to get popular.

Local vs Global lookup.

Nam


On Mon, Jan 7, 2013 at 8:48 AM, Simeon Franklin <[address removed]> wrote:


Your feedback is appreciated!





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Nam Nguyen ([address removed]) from San Francisco Python Meetup Group.
To learn more about Nam Nguyen, visit his/her member profile




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Hy Carrel ([address removed]) from San Francisco Python Meetup Group.
To learn more about Hy Carrel, visit his/her member profile Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]



--
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Alex Gaynor ([address removed]) from San Francisco Python Meetup Group.
To learn more about Alex Gaynor, visit his/her member profile




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Michael Hood ([address removed]) from San Francisco Python Meetup Group.
To learn more about Michael Hood, visit his/her member profile



--
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Alex Gaynor ([address removed]) from San Francisco Python Meetup Group.
To learn more about Alex Gaynor, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]

Our Sponsors

  • Yelp

    Providing food, beverages, venue, and a good time!

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy