Re: [Zope3-dev] AdapterLookup C optimizations 'timeit' benchmarks

2005-08-14 Thread Jim Fulton

Benji York wrote:

Ruslan Spivak wrote:


By my estimations(i hope i'm not wrong :) C version gives ~20-26% speed
up for different methods.



Running the functional tests for a Zope 3 based systems with 434 tests 
yielded (best of 3) a time of 1:12.51 for the trunk and 1:12.32 for the 
branch.  That's about a 0.25 percent improvement.


Unfortunately that doesn't seem like enough to justify the port to C. 


Agreed.

It's curious that this had such a small impact.  I haven't had a
chance to to look at the changes.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] AdapterLookup C optimizations 'timeit' benchmarks

2005-08-14 Thread Jim Fulton

Ruslan Spivak wrote:

Hello.

For those who is interested, i created blog entry containing 'timeit'
benchmarks results for Python and C versions of AdapterLookup:
http://blogs.nuxeo.com/sections/blogs/ruslan_spivak/2005_08_05_adapterlookup_c

There is also test script attached there.

By my estimations(i hope i'm not wrong :) C version gives ~20-26% speed
up for different methods.


I hate to say this, but I'm working of a total redesign of the adapter
management and lookup architecture.  I'll evaluate it before I adopt it,
but if I do, it will make your changes irrelevent.  I with I knew you
were working on this. Sorry.

I'll be interested to look at your changes when I have time, which won't
be for a few weeks.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] AdapterLookup C optimizations 'timeit' benchmarks

2005-08-05 Thread Ruslan Spivak
В Птн, 05/08/2005 в 09:46 -0400, Benji York пишет:
> Ruslan Spivak wrote:
[...]
> Running the functional tests for a Zope 3 based systems with 434 tests 
> yielded (best of 3) a time of 1:12.51 for the trunk and 1:12.32 for the 
> branch.  That's about a 0.25 percent improvement.
> 
> Unfortunately that doesn't seem like enough to justify the port to C. 
> Perhaps future work will make the improvement greater.

Yes, total rewrite of Zope3 to C :)

But seriously, tests were done in isolation just for method calls and
that is how it should to be to get net results. If you, for example,
try to run 
python test.py -vpu --dir src/zope/interface
on the trunk and then comment importing of C version of _interface_
optimizations and rerun the tests again you'll see mainly no difference
too, maybe 1.2% speed decrease.
So i agree with Stephan's remarks that it may be useful, but your point
is good and is worth exploring. I would really like to hear something
from Jim about the issue.

Ruslan


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] AdapterLookup C optimizations 'timeit' benchmarks

2005-08-05 Thread Stephan Richter
On Friday 05 August 2005 09:46, Benji York wrote:
> > By my estimations(i hope i'm not wrong :) C version gives ~20-26% speed
> > up for different methods.
>
> Running the functional tests for a Zope 3 based systems with 434 tests
> yielded (best of 3) a time of 1:12.51 for the trunk and 1:12.32 for the
> branch.  That's about a 0.25 percent improvement.

That's a bad argument. Several projects only use zope.interface and its 
adapter registry (for example twisted). For them a 20-26% improvement for the 
adapter lookup would be significant. Just because other parts of Zope 3 are 
even slower and use more time than the adapter lookup, it does not have to 
mean that this is a bad/insufficient improvement.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] AdapterLookup C optimizations 'timeit' benchmarks

2005-08-05 Thread Benji York

Ruslan Spivak wrote:

By my estimations(i hope i'm not wrong :) C version gives ~20-26% speed
up for different methods.


Running the functional tests for a Zope 3 based systems with 434 tests 
yielded (best of 3) a time of 1:12.51 for the trunk and 1:12.32 for the 
branch.  That's about a 0.25 percent improvement.


Unfortunately that doesn't seem like enough to justify the port to C. 
Perhaps future work will make the improvement greater.

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com