[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Anything speaking against this simplification?
From: |
Han-Wen Nienhuys |
Subject: |
Re: Anything speaking against this simplification? |
Date: |
Sun, 31 Jul 2011 23:28:39 -0300 |
On Sat, Jul 30, 2011 at 5:19 PM, David Kastrup <address@hidden> wrote:
> music_list in parser.yy temporarily maintains an awkward
> half-self-referential data structure in order to have "fast append". It
> makes more sense in my opinion to use prepend and reverse afterwards.
> "Fast append" in theory may show minimally better cache coherency at the
> cost of uglier code and uglier data structures. So I'd just like to do
> the following (no full regtest yet).
>
> Comments?
I'm fine either way.
Originally all lists in the parser were C++ ones (doubly linked IIRC)
with a consistent direction. Having the Scheme lists not reverse
direction may have seemed easier at the time.
The performance overhead (even if you used non-destructive reverse) is
probably neglible; I wouldn't bother measuring it.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen