This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Steve Howell
Recipients Steve Howell, flox
Date 2010-01-26.11:58:24
SpamBayes Score 0.0023835655
Marked as misclassified No
Message-id <214087.27799.qm@web33506.mail.mud.yahoo.com>
In-reply-to <1264506782.6.0.531456479806.issue7784@psf.upfronthosting.co.za>
Content
--- On Tue, 1/26/10, Florent Xicluna <report@bugs.python.org> wrote:

> From: Florent Xicluna <report@bugs.python.org>
> Subject: [issue7784] patch for making list/insert at the top of the list avoid memmoves
> To: showell30@yahoo.com
> Date: Tuesday, January 26, 2010, 3:53 AM
> 
> Florent Xicluna <laxyf@yahoo.fr>
> added the comment:
> 
> Steve, thank you for your patch.
> 
> IMHO, it's better to provide a patch against trunk (Py2)
> when the optimization is not specific to 3.x.
> 
> I merged it manually on my working copy, and all tests pass
> without leaking. Patch for Py2 attached.
> 
> However, I am not an expert. I just cleaned the tab/space
> mix to conform with what is used in the listobject.c file.
> 

Thank you!  My only rationale for applying the patch to 3.x was that it would minimize backward compatibility concerns, but I do not have a strong opinion either way.

You probably noticed a few stylistic mistakes, such as these lines:

            a->orphans += (-1 * d);
            a->ob_item += (-1 * d);

All feedback on ways to improve this code would be greatly welcome.

Thanks again.
History
Date User Action Args
2010-01-26 11:58:26Steve Howellsetrecipients: + Steve Howell, flox
2010-01-26 11:58:25Steve Howelllinkissue7784 messages
2010-01-26 11:58:24Steve Howellcreate