lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficiency of alist vs. vector/array


From: David Kastrup
Subject: Re: Efficiency of alist vs. vector/array
Date: Tue, 18 Jul 2017 18:52:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Urs Liska <address@hidden> writes:

> What I do *not* know is: would that be worth it (apart from the
> educational value) in real life? In that project I had a song of a few
> pages containing about 5.600 IDs. It's not clear how many override
> that would get when finished, but let's assume it'll grow to a few
> hundred and take 100 as a hypothetical reference.

Why?  If you do \override without \temporary, any previous alist element
with the given id set in the same context will be removed first.

So where do you get the 100?

> My gut feeling is that's really a lot of unnecessary stuff, and one
> should try to improve where possible. OTOH I don't really have
> substantial experience wtih this tpic and don't know how that relates
> to what's going on in the whole compilation process. OTOH what would
> be if I consider using such a setting for a full symphony with maybe
> 100.000 grobs and 1.000 overrides? Would I then have to consider a
> better data structure? Would I then have to think about a totally
> different approach?
>
> Any food for thought, educated guesses, advice?

You could use an object property just for storing the id of a grob if
the override machinery (which works in context hierarchies and handles
subproperties) is not needed.

Check out make-object-property in the manual.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]