David Nalesnik <[email protected]> writes: > Hi all, > > I'm working with very large Scheme lists of pitches in an ly file, > transforming them, and passing them about from function to function. > Right now, I'm using actual Pitch objects (such as you would produce > with ly:make-pitch). Would it be a better idea to work with pitches > simply as number lists--for example, (0 0 0) for middle C--and > instantiate the pitches only at the end when I'm ready for > typesetting?
No? > This would of course require writing Scheme versions of > ly:pitch-transpose, ly:pitch-diff, and the like. > > This may be a "try it and see" type of question, but I thought I would > ask before I embark on such a major revision of my work. Pitches as a data structure contain one allocation. In contrast, a list contains one allocation for each element (short of immediate SCM data types which small integers are) and one allocation for its containing cons cell each. Those allocations are of a "more standard" size but I doubt that will make all that much of a difference. So I suspect that you are likely to end up worse than what you started with. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
