<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18372">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>The measurements are just a distractor. We
all already know that the hook is being added to a critical path. Everyone
will pay a cost for a feature that few people will use. This is a really
bad idea. It is not part of a thorough, thought-out framework of container
hooks (something that would need a PEP at the very least). The
case for how it helps us is somewhat thin. The case for DTrace hooks was
much stronger. </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>If something does go in, it should be #ifdef'd out
by default. But then, I don't think it should go in at all.
</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Raymond</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">On Thu, Apr 2, 2009 at 04:16, John Ehresman
<SPAN dir=ltr><<A
href="mailto:jpe@wingware.com">jpe@wingware.com</A>></SPAN>
wrote:<BR></DIV>
<DIV class=gmail_quote>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV class=im>Collin Winter wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Have you measured the impact on
performance?<BR></BLOCKQUOTE><BR></DIV>I've tried to test using pystone, but
am seeing more differences between runs than there is between python w/ the
patch and w/o when there is no hook installed. The highest pystone is
actually from the binary w/ the patch, which I don't really believe unless
it's some low level code generation affect. The cost is one test of a
global variable and then a switch to the branch that doesn't call the
hooks.<BR><BR>I'd be happy to try to come up with better numbers next week
after I get home from pycon.<BR><FONT color=#888888></FONT></BLOCKQUOTE>
<DIV><BR>Pystone is pretty much a useless benchmark. If it measures anything,
it's the speed of the bytecode dispatcher (and it doesn't measure it
particularly well.) PyBench isn't any better, in my experience. Collin has
collected a set of reasonable benchmarks for Unladen Swallow, but they still
leave a lot to be desired. From the discussions at the VM and Language summits
before PyCon, I don't think anyone else has better benchmarks, though, so I
would suggest using Unladen Swallow's: <A
href="http://code.google.com/p/unladen-swallow/wiki/Benchmarks">http://code.google.com/p/unladen-swallow/wiki/Benchmarks</A><BR></DIV></DIV><BR></BLOCKQUOTE></BODY></HTML>