On Fri, Aug 15, 2008 at 19:30, Christian Heimes [EMAIL PROTECTED] wrote:
Please also note that CPython uses a freelist of unused dict instances.
The default size of the dict free list is 80 elements. The allocation
and deallocation of dicts is cheap if you can stay below the threshold.
That's
Hello all,
While we are on the subject of C-API changes, I've noticed that quite a
few of the sub-classes of ndarray are constructed to basically add
meta-information to the array.
What if the base-class ndarray grew a dict object at it's end to hold
meta information.
Naturally, several
On Fri, Aug 15, 2008 at 1:58 PM, Travis E. Oliphant
[EMAIL PROTECTED]wrote:
Hello all,
While we are on the subject of C-API changes, I've noticed that quite a
few of the sub-classes of ndarray are constructed to basically add
meta-information to the array.
What if the base-class ndarray
On Fri, Aug 15, 2008 at 2:10 PM, Charles R Harris [EMAIL PROTECTED]
wrote:
On Fri, Aug 15, 2008 at 1:58 PM, Travis E. Oliphant
[EMAIL PROTECTED] wrote:
Hello all,
While we are on the subject of C-API changes, I've noticed that quite a
few of the sub-classes of ndarray are constructed
On Fri, Aug 15, 2008 at 15:15, Charles R Harris
[EMAIL PROTECTED] wrote:
On Fri, Aug 15, 2008 at 2:10 PM, Charles R Harris
[EMAIL PROTECTED] wrote:
On Fri, Aug 15, 2008 at 1:58 PM, Travis E. Oliphant
[EMAIL PROTECTED] wrote:
Hello all,
While we are on the subject of C-API changes, I've
Robert Kern wrote:
3) Are the additional 4-8 bytes too expensive
One of the problems with numarray was the time taken to allocate small
arrays. Would adding a dictionary slow down the allocation of numpy arrays?
No, I don't think so, not if we did nothing by default but set
On Fri, Aug 15, 2008 at 3:12 PM, Travis E. Oliphant
[EMAIL PROTECTED]wrote:
Robert Kern wrote:
3) Are the additional 4-8 bytes too expensive
One of the problems with numarray was the time taken to allocate small
arrays. Would adding a dictionary slow down the allocation of numpy
Robert Kern wrote:
I think you could make the dictionary created lazily on the first getattr().
In order to make it work you have to reserve space for a PyObject*
pointer for the instance dict somewhere in your type definition. It's
going to increase the size of every object by 4 bytes on a
On Fri, Aug 15, 2008 at 17:31, Christian Heimes [EMAIL PROTECTED] wrote:
Robert Kern wrote:
I think you could make the dictionary created lazily on the first getattr().
In order to make it work you have to reserve space for a PyObject*
pointer for the instance dict somewhere in your type
Robert Kern wrote:
Yes, we know that. The concern I was addressing was the time overhead
for creating the new dict object every time an ndarray gets
instantiated. Most of these dict objects would be unused, so we would
be wasting a substantial amount of time. If you push off the creation
of
10 matches
Mail list logo