On Wed, Nov 25, 2009 at 21:24, Martin Buchholz <marti...@google.com> wrote:
> On Mon, Nov 23, 2009 at 22:51, Goktug Gokdogan <gokdo...@gmail.com> wrote:
>> Nobody is interested or everybody is busy?
>
> I think there's a place for a StringBuilder-like
> abstraction that uses a gap buffer,
> but it shouldn't replace StringBuilder.

Let me qualify that.

It is hard to sell the small slowdown in the common case
to make other (rare?) operations much faster.
ArrayList should have been implemented to allow
O(1) insert at both ends, like ArrayDeque,
but it is hard to persuade the maintainers
that such a change is worth making today,
when the benchmarks all exercise only the common case.
Similarily for a hypothetical GapArrayList.
On the other hand, on modern cpus
arithmetic is ever closer to being "free",
so it is easier to justify the extra computation.

Martin

Reply via email to