On Sun, Oct 01, 2006 at 02:01:51PM -0400, Jean-Paul Calderone wrote:
Each line in an interactive session is compiled separately, like modules
are compiled separately. With the current implementation, literals in a
single compilation unit have a chance to be cached like this. Literals
in
On 9/30/06, Giovanni Bajo [EMAIL PROTECTED] wrote:
Guido van Rossum wrote:
OK. Pronouncement: PEP 355 is dead. [...]
It would be terrific if you gave us some clue about what is
wrong in PEP355, [...]
Here are my guesses. I believe Guido rejected this PEP for a lot of reasons.
By the way,
Hans Polak wrote:
Hi Nick,
Yep, PEP 315. Sorry about that.
Now, about your suggestion
do:
setup code
while condition
loop body
else:
loop completion code
This is pythonic, but not logical. The 'do' will execute at least once, so
the
Nick Coghlan schrieb:
Right. Although I do wonder what kind of software people write to run
into this problem. As Guido points out, the numbers must be the result
from some computation, or created by an extension module by different
means. If people have many *simultaneous* copies of 0.0, I
Kristján V. Jónsson schrieb:
Well, a lot of extension code, like ours use PyFloat_FromDouble(foo);
This can be from vectors and stuff.
Hmm. If you get a lot of 0.0 values from vectors and stuff, I would
expect that memory usage is already high.
In any case, a module that creates a lot of
Kristján V. Jónsson schrieb:
I can't see how this situation is any different from the re-use of
low ints. There is no fundamental law that says that ints below 100
are more common than other, yet experience shows that this is so,
and so they are reused.
There are two important differences:
I see, you are thinking of the general fractional case.
My point was that whole numbers seem to pop up often and to reuse those is easy
I did a test of tracking actual floating point numbers and the majority of
heavy usage comes
from integral values. It would indeed be strange if some
Martin v. Löwis [EMAIL PROTECTED] writes:
Kristján V. Jónsson schrieb:
I can't see how this situation is any different from the re-use of
low ints. There is no fundamental law that says that ints below 100
are more common than other, yet experience shows that this is so,
and so they are
Michael Hudson schrieb:
1. it is possible to determine whether the value is special in
constant time, and also fetch the singleton value in constant
time for ints; the same isn't possible for floats.
I don't think you mean constant time here do you?
Right; I really wondered whether
On Mon, Oct 02, 2006, Martin v. L?wis wrote:
Michael Hudson schrieb:
I think most of
the code posted so far has been constant time, at least in terms of
instruction count, though some might indeed be fairly slow on some
processors -- conversion from double to integer on the PowerPC
involves
[EMAIL PROTECTED] wrote:\/
Steve By these statistics I think the answer to the original question
Steve is clearly no in the general case.
As someone else (Guido?) pointed out, the literal case isn't all that
interesting. I modified floatobject.c to track a few interesting
floating
In the interest of time I have decided to go ahead and do the PEP 302 phase 2 work in C. I fully expect to tackle rewriting import in Python in my spare time after I finish this work since I will be much more familiar with how the whole import machinery works and it sounds like a fun challenge.
At 01:01 PM 10/2/2006 -0700, Brett Cannon wrote:
In the interest of time I have decided to go ahead and do the PEP 302
phase 2 work in C.
Just FYI, it's not possible (so far as I know) to implement phase 2 while
maintaining backward compatibility with existing 2.x code. So this work
shouldn't
On 10/2/06, Phillip J. Eby [EMAIL PROTECTED] wrote:
Just FYI, it's not possible (so far as I know) to implement phase 2 while
maintaining backward compatibility with existing 2.x code. So this work
shouldn't go back to the 2.x trunk without discussion of those issues.
While that's a fair
On 10/2/06, Paul Moore [EMAIL PROTECTED] wrote:
On 10/2/06, Phillip J. Eby [EMAIL PROTECTED] wrote:[SNIP] I'm surprised, however, that you think working on this in C is going to be *less* time than it would take to simply replace __import__ with a Python
function that reimplements PEP 302...That
[EMAIL PROTECTED] wrote:
Steve By these statistics I think the answer to the original
question Steve is clearly no in the general case.
As someone else (Guido?) pointed out, the literal case isn't all that
interesting. I modified floatobject.c to track a few interesting
floating
At 03:48 PM 10/2/2006 -0700, Brett Cannon wrote:
On 10/2/06, Paul Moore mailto:[EMAIL PROTECTED][EMAIL PROTECTED]
wrote:
On 10/2/06, Phillip J. Eby
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:
[SNIP]
I'm surprised, however, that you think working on this in C is going to be
*less* time
On behalf of the PSF Infrastructure committee, I am happy to report that we have reached a recommendation for a new issue tracker for Python!But first, I want to extend our thanks to all who stepped forward to provide the committee with a test installation of an issue tracker to use as a basis of
Kristján V. Jónsson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Anyway, Skip noted that 50% of all floats are whole numbers between -10
and 10 inclusive,
Please, no. He said something like this about *non-floating-point
applications* (evidence unspecified, that I remember).
On Mon, Oct 02, 2006 at 11:27:07PM +0100, Paul Moore wrote:
Yes, I'm quite surprised at how much has appeared in pkgutil. The
what's new entry is very terse, and the module documentation itself
hasn't been updated to mention the new stuff.
These two things are related, of course; I couldn't
Tim This doesn't actually give us a very useful indication of potential
Tim memory savings. What I think would be more useful is tracking the
Tim maximum simultaneous count of each value i.e. what the maximum
Tim refcount would have been if they were shared.
Most definitely. I
Terry Kristján V. Jónsson [EMAIL PROTECTED] wrote:
Anyway, Skip noted that 50% of all floats are whole numbers between
-10 and 10 inclusive,
Terry Please, no. He said something like this about
Terry *non-floating-point applications* (evidence unspecified, that I
Terry
At 08:21 PM 10/2/2006 -0400, A.M. Kuchling wrote:
On Mon, Oct 02, 2006 at 11:27:07PM +0100, Paul Moore wrote:
Yes, I'm quite surprised at how much has appeared in pkgutil. The
what's new entry is very terse, and the module documentation itself
hasn't been updated to mention the new stuff.
skip Most definitely. I just posted what I came up with in about two
skip minutes. I'll add some code to track the high water mark as well
skip and report back.
Using the smallest change I could get away with, I came up with these
allocation figures (same as before):
-1.0:
24 matches
Mail list logo