[Python-Dev] Silly little benchmark
Thomas Wouters
thomas@xs4all.net
Thu, 12 Jul 2001 15:54:09 +0200
On Thu, Jul 12, 2001 at 08:13:16AM -0500, Skip Montanaro wrote:
> Tim> AFAIK, nobody did anything *except* discuss it so far. Insert an
> Tim> early special case for sequence cat, and you slow each numeric
> Tim> addition by the time it takes to fail that test, so there's no
> Tim> killer argument either way. int+int is special-cased by
> Tim> BINARY_ADD, but everything else goes thru the general machinery.
> Hmmm... What file we talkin' about Willis?
ceval.c, just look for BINARY_ADD.
> If we did
> test for int+int
> test for string+string
> general machinery
> we might speed up a couple very common cases enough to have an overall win.
Don't forget to do meaningful performance comparisons before and after ;P
--
Thomas Wouters <thomas@xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!