[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Magnitude of Order "For Loop" performance deltas based on syntax cha
From: |
Dan Douglas |
Subject: |
Re: Magnitude of Order "For Loop" performance deltas based on syntax change |
Date: |
Mon, 26 Sep 2016 19:05:36 -0500 |
On Mon, Sep 26, 2016 at 3:32 PM, Chet Ramey <chet.ramey@case.edu> wrote:
> So you want offset N to be the nth element in the array instead of the >
element with index N? Huh.
Maybe, not always. Both would be nice. The offset isn't the element with
the index N. It's the next set element whose index is >= that of the
selected offset. There's no simple way of knowing how many set elements
come before or after offset - possibly zero. In order to insert something
after the first element you have to find the index of the first element.
> Well, you probably want another data structure.
Yes please. Everybody wants more data structures. (I know... patches
accepted.)