[Python-Dev] What to intern (e.g. func_code.co_filename)?

2010-02-13 Thread Jake McGuire
Has anyone come up with rules of thumb for what to intern and what the performance implications of interning are? I'm working on profiling App Engine again, and since they don't allow marshall I have to modify pstats to save the profile via pickle. While trying to get profiles under 1MB, I noticed

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-23 Thread Jake McGuire
On Fri, Jan 22, 2010 at 11:07 AM, Collin Winter wrote: > Hey Jake, > > On Thu, Jan 21, 2010 at 10:48 AM, Jake McGuire wrote: >> On Thu, Jan 21, 2010 at 10:19 AM, Reid Kleckner wrote: >>> On Thu, Jan 21, 2010 at 12:27 PM, Jake McGuire wrote: >>>> On Wed, Ja

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-21 Thread Jake McGuire
On Thu, Jan 21, 2010 at 10:19 AM, Reid Kleckner wrote: > On Thu, Jan 21, 2010 at 12:27 PM, Jake McGuire wrote: >> On Wed, Jan 20, 2010 at 2:27 PM, Collin Winter >> wrote: >>> Profiling >>> - >>> >>> Unladen Swallow integrates with oP

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-21 Thread Jake McGuire
On Wed, Jan 20, 2010 at 2:27 PM, Collin Winter wrote: > Profiling > - > > Unladen Swallow integrates with oProfile 0.9.4 and newer [#oprofile]_ to > support > assembly-level profiling on Linux systems. This means that oProfile will > correctly symbolize JIT-compiled functions in its repor

Re: [Python-Dev] PEP 3144 review.

2009-09-17 Thread Jake McGuire
On Thursday, September 17, 2009, Daniel Fetchinson wrote: >> 188 (check that, 190) people have downloaded the 2.0 release in the >> last week (numbers publicly available from the http://code.google.com). I >> can't tell you how many (if any) have downloaded it via svn. > > Down

Re: [Python-Dev] PEP 3144 review.

2009-09-16 Thread Jake McGuire
On Tue, Sep 15, 2009 at 11:44 AM, Jake McGuire wrote: > On Tue, Sep 15, 2009 at 11:36 AM, Peter Moody wrote: > >> On Tue, Sep 15, 2009 at 11:33 AM, Jake McGuire >> wrote: >> > On Tue, Sep 15, 2009 at 10:36 AM, Peter Moody wrote: >> >> >> >

Re: [Python-Dev] PEP 3144 review.

2009-09-16 Thread Jake McGuire
On Tue, Sep 15, 2009 at 11:36 AM, Peter Moody wrote: > On Tue, Sep 15, 2009 at 11:33 AM, Jake McGuire wrote: > > On Tue, Sep 15, 2009 at 10:36 AM, Peter Moody wrote: > >> > >> On Tue, Sep 15, 2009 at 10:16 AM, Jake McGuire > wrote: > >> > On Mon,

Re: [Python-Dev] PEP 3144 review.

2009-09-15 Thread Jake McGuire
On Tue, Sep 15, 2009 at 10:36 AM, Peter Moody wrote: > On Tue, Sep 15, 2009 at 10:16 AM, Jake McGuire wrote: > > On Mon, Sep 14, 2009 at 9:54 AM, Guido van Rossum > wrote: > >> > >> What's the opinion of the other interested party or parties? I don't &g

Re: [Python-Dev] PEP 3144 review.

2009-09-15 Thread Jake McGuire
On Mon, Sep 14, 2009 at 9:54 AM, Guido van Rossum wrote: > What's the opinion of the other interested party or parties? I don't > want a repeat of the events last time, where we had to pull it at the > last time because there hadn't been enough discussion. How many other people are using this l

Re: [Python-Dev] default of returning None hurts performance?

2009-09-01 Thread Jake McGuire
On Mon, Aug 31, 2009 at 5:01 PM, Greg Ewing wrote: > Antoine Pitrou wrote: > > Did your coworker run any timings instead of basing his assumptions on >> bytecode >> size? >> > > In any case, what are you suggesting -- that the last value > returned by a function call in the body should be the > d

[Python-Dev] deprecated methods on array objects

2009-08-27 Thread Jake McGuire
The python documentation says that the read() and write() methods on array objects have been deprecated since 1.5.1. I assume this is because their semantics are almost the exact opposite of read() and write() on a file-like object; array.read() reads data from a file into the array and array.writ

Re: [Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

2009-08-25 Thread Jake McGuire
On Mon, Aug 24, 2009 at 9:54 PM, Peter Moody wrote: > I personally hope that's not required; yours has been the only > dissenting email and I believe I respond to all of your major points > here. Silence is not assent. ipaddr looks like a reasonable library from here, but AFAIK it's not widely us

Re: [Python-Dev] Google Wave as a developer communication tool

2009-06-04 Thread Jake McGuire
Google Wave is also still in tightly restricted beta. Gmail went through a long invite-only period. Until we have an idea of how long it will be until basically all python developers who want a Wave account can get one, it doesn't make sense to talk about using it for python development, IMO. -j

Re: [Python-Dev] Issues with process and discussions (Re: Issues with Py3.1's new ipaddr)

2009-06-03 Thread Jake McGuire
On Wed, Jun 3, 2009 at 10:41 AM, wrote: > > On 02:39 am, gu...@python.org wrote: >> >> I'm disappointed in the process -- it's as if nobody really reviewed >> the API until it was released with rc1, and this despite there being a >> significant discussion about its inclusion and alternatives mont

Re: [Python-Dev] Issues with Py3.1's new ipaddr

2009-06-02 Thread Jake McGuire
On Tue, Jun 2, 2009 at 9:26 AM, Clay McClure wrote: > On Tue, Jun 2, 2009 at 2:08 AM, "Martin v. Löwis" wrote: > >>> That doesn't solve much. IPv4 objects still always use CIDR notation >>> when coerced to strings, meaning that IP addresses will always be >>> rendered with a trailing "/32". >> >>

Re: [Python-Dev] Issues with Py3.1's new ipaddr

2009-06-01 Thread Jake McGuire
On Mon, Jun 1, 2009 at 6:54 PM, Jake McGuire wrote: > On Mon, Jun 1, 2009 at 12:16 PM, "Martin v. Löwis" wrote: > >> As for Clay McLure's issue: I feel it's primarily a matter of taste. >> I see nothing morally wrong in using the same class for hosts and &g

Re: [Python-Dev] Issues with Py3.1's new ipaddr

2009-06-01 Thread Jake McGuire
On Mon, Jun 1, 2009 at 12:16 PM, "Martin v. Löwis" wrote: > As for Clay McLure's issue: I feel it's primarily a matter of taste. > I see nothing morally wrong in using the same class for hosts and > networks, i.e. representing a host as a network of size 1. I can > understand why people dislike th

Re: [Python-Dev] Rethinking intern() and its data structure

2009-04-09 Thread Jake McGuire
On Apr 9, 2009, at 12:06 PM, Martin v. Löwis wrote: Now that you brought up a specific numbers, I tried to verify them, and found them correct (although a bit unfortunate), please see my test script below. Up to 21800 interned strings, the dict takes (only) 384kiB. It then grows, requiring 1536ki

Re: [Python-Dev] undesireable unpickle behavior, proposed fix

2009-01-27 Thread Jake McGuire
On Jan 27, 2009, at 12:39 PM, Martin v. Löwis wrote: I may have misunderstood how unpickling works Perhaps I have misunderstood your patch. Posting it to Rietveld might also be useful. It is not immediately clear to me how Rietveld works. But I have created an issue on tracker: http://bu

Re: [Python-Dev] undesireable unpickle behavior, proposed fix

2009-01-27 Thread Jake McGuire
On Jan 27, 2009, at 11:40 AM, Martin v. Löwis wrote: Hm. This would change the pickling format though. Wouldn't just interning (short) strings on unpickling be simpler? Sure - that's what Jake had proposed. However, it is always difficult to select which strings to intern - his heuristics (IIUC

[Python-Dev] undesireable unpickle behavior, proposed fix

2009-01-27 Thread Jake McGuire
Instance attribute names are normally interned - this is done in PyObject_SetAttr (among other places). Unpickling (in pickle and cPickle) directly updates __dict__ on the instance object. This bypasses the interning so you end up with many copies of the strings representing your attribut