[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[2]: sunday afternoon whishlist
- From: Arseny Vakhrushev <arseny.vakhrushev@...>
- Date: Mon, 10 May 2010 20:56:44 +0400
>> Could x[] be syntactic sugar for x[#x+1] ?
>> It would make appending to lists so much nicer.
> I would worry about the hidden performance implications of this. The
> magic # operator performs a binary search of both storage parts of the
> table, which is an O(log N) operation.
The # operator has constant complexity I suppose. It doesn't deal with the associative part of a
table at all. Moreover, it is not a true "length" operator for the dense part as it works that way
only for well-managed sequences.