cool-RR wrote:
> I'm curious. If I append an item to a list from the left using
> `list.insert`, will Python always move the entire list one item to the
> right (which can be super-slow) or will it check first to see whether it
> can just allocate more memory to the left of the list and put the it
On Friday, February 7, 2014 6:52:24 AM UTC+2, Dan Stromberg wrote:
> On Thu, Feb 6, 2014 at 3:59 PM, cool-RR wrote:
>
> I'm pretty sure it'll slide all the existing elements right one
> position, and add at the leftmost position just opened up - assuming
> you're inserting at position 0.
>
> As
On Thu, Feb 6, 2014 at 3:59 PM, cool-RR wrote:
> Hi,
>
> I'm curious. If I append an item to a list from the left using `list.insert`,
> will Python always move the entire list one item to the right (which can be
> super-slow) or will it check first to see whether it can just allocate more
> me
Roy Smith wrote:
O(-1). In Soviet Russia, operation performs you!
It's rumoured that the PSU is developing a time
machine module that can achieve O(-n), but
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Feb 7, 2014 at 2:29 PM, Rustom Mody wrote:
> On Friday, February 7, 2014 8:44:43 AM UTC+5:30, Chris Angelico wrote:
>> On Fri, Feb 7, 2014 at 2:00 PM, Roy Smith wrote:
>> > Dave Angel wrote:
>> >> list does not promise better than O(1) behavior
>> > I'm not aware of any list implementati
On Friday, February 7, 2014 8:44:43 AM UTC+5:30, Chris Angelico wrote:
> On Fri, Feb 7, 2014 at 2:00 PM, Roy Smith wrote:
> > Dave Angel wrote:
> >> list does not promise better than O(1) behavior
> > I'm not aware of any list implementations, in any language, that
> > promises better than O(1) b
On Friday, February 7, 2014 5:00:56 AM UTC+2, Roy Smith wrote:
> In article ,
>
> Dave Angel wrote:
> > list does not promise better than O(1) behavior
> I'm not aware of any list implementations, in any language, that
> promises better than O(1) behavior for any operations. Perhaps there is
>
On Fri, Feb 7, 2014 at 2:11 PM, Tim Chase wrote:
> On 2014-02-06 22:00, Roy Smith wrote:
>> > list does not promise better than O(1) behavior
>>
>> I'm not aware of any list implementations, in any language, that
>> promises better than O(1) behavior for any operations. Perhaps
>> there is O(j),
On Fri, Feb 7, 2014 at 2:00 PM, Roy Smith wrote:
> In article ,
> Dave Angel wrote:
>
>> list does not promise better than O(1) behavior
>
> I'm not aware of any list implementations, in any language, that
> promises better than O(1) behavior for any operations. Perhaps there is
> O(j), where y
In article ,
Tim Chase wrote:
> On 2014-02-06 22:00, Roy Smith wrote:
> > > list does not promise better than O(1) behavior
> >
> > I'm not aware of any list implementations, in any language, that
> > promises better than O(1) behavior for any operations. Perhaps
> > there is O(j), where yo
In article ,
Dave Angel wrote:
> list does not promise better than O(1) behavior
I'm not aware of any list implementations, in any language, that
promises better than O(1) behavior for any operations. Perhaps there is
O(j), where you just imagine the operation was performed?
--
https://mail
On 2014-02-06 22:00, Roy Smith wrote:
> > list does not promise better than O(1) behavior
>
> I'm not aware of any list implementations, in any language, that
> promises better than O(1) behavior for any operations. Perhaps
> there is O(j), where you just imagine the operation was performed?
On Friday, February 7, 2014 8:30:56 AM UTC+5:30, Roy Smith wrote:
> Dave Angel wrote:
>
> > list does not promise better than O(1) behavior
>
> I'm not aware of any list implementations, in any language, that
> promises better than O(1) behavior for any operations. Perhaps there is
> O(j), wh
On 2/6/2014 7:42 PM, MRAB wrote:
On 2014-02-06 23:59, cool-RR wrote:
Hi,
I'm curious. If I append an item to a list from the left using
`list.insert`, will Python always move the entire list one item to
the right (which can be super-slow) or will it check first to see
whether it can just alloca
On 2014-02-06 23:59, cool-RR wrote:
Hi,
I'm curious. If I append an item to a list from the left using
`list.insert`, will Python always move the entire list one item to
the right (which can be super-slow) or will it check first to see
whether it can just allocate more memory to the left of the
On 2/6/2014 6:59 PM, cool-RR wrote:
Hi,
I'm curious. If I append an item to a list from the left using
`list.insert`, will Python always move the entire list one item to
the right (which can be super-slow) or will it check first to see
whether it can just allocate more memory to the left of the
Hi,
I'm curious. If I append an item to a list from the left using `list.insert`,
will Python always move the entire list one item to the right (which can be
super-slow) or will it check first to see whether it can just allocate more
memory to the left of the list and put the item there, saving
17 matches
Mail list logo