Re: [Zope3-dev] Re: [Zope-dev] 64-bit BTrees

2006-04-19 Thread Wichert Akkerman
Previously Chris Withers wrote:
 The implicit change to make them all 64-bits which results in some 
 unknown slowdown for all I BTree users seems a bit too scary to bite 
 off...

Has anyone done any benchmarks to prove that 64-bits is slower or
faster? It would be interesting to see benchmarks on modern 32bit
and a 64bit systems. Until then it's all hand-waiving.

Wichert.

-- 
Wichert Akkerman [EMAIL PROTECTED]It is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope3-dev] Re: [Zope-dev] 64-bit BTrees

2006-04-19 Thread Shane Hathaway

Wichert Akkerman wrote:

Previously Chris Withers wrote:

The implicit change to make them all 64-bits which results in some 
unknown slowdown for all I BTree users seems a bit too scary to bite 
off...



Has anyone done any benchmarks to prove that 64-bits is slower or
faster? It would be interesting to see benchmarks on modern 32bit
and a 64bit systems. Until then it's all hand-waiving.


One data point: on my AMD 64 box, when I run 32 bit Linux, I get about 
30,000 pystones, while 64 bit Linux yields 50,000 pystones.  This 
doesn't mean 64 bit code is necessarily faster, but it does suggest that 
64 bit CPUs prefer 64 bit code.


Shane
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] 64-bit BTrees

2006-04-17 Thread Chris Withers

Fred Drake wrote:

(possibly named LLBTree, LOBTree, and OLBTree).


For my half-penny's worth, this is the way I'd like to see it go.
Explicit is better than implicit and all that.

If you need more than 32-bits, you can explicitly use them.

The implicit change to make them all 64-bits which results in some 
unknown slowdown for all I BTree users seems a bit too scary to bite 
off...


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] 64-bit BTrees

2006-04-13 Thread Fred Drake
I have a need for 64-bit BTrees (at least for IOBTree and OIBTree),
and I'm not the first.  I've created a feature development branch for
this, and checked in my initial implementation.

I've modified the existing code to use PY_LONG_LONG instead of int for
the key and/or value type; there's no longer a 32-bit version in the
modified code.  Any Python int or long that can fit in 64 bits is
accepted; ValueError is raised for values that require 65 bits (or
more).  Keys and values that can be reported as Python ints are, and
longs are only returned when the value cannot be converted to a Python
int.

This can have a substantial effect on memory consumption, since keys
and/or values now take twice the space.  There may be performance
issues as well, but those have not been tested.

There are new unit tests, but more are likely needed.

If you're interested in getting the code from Subversion, it's available at:

svn://svn.zope.org/repos/main/ZODB/branches/fdrake-64bits/

Ideally, this or some variation on this could be folded back into the
main development for ZODB.  If this is objectionable, making 64-bit
btrees available would require introducing new versions of the btrees
(possibly named LLBTree, LOBTree, and OLBTree).

I welcome comments.


  -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
Don't let schooling interfere with your education. -- Mark Twain
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )