Clean up break substitution
Clean up fast_substitute_grob_array
This is mainly an attempt to modernize this function and eliminate dead code.
The new version might be faster than the old, but it's hard to be sure. I measured elapsed time and maximum RSS using the following input with /usr/bin/time -v
, and I don't think that the new version is slower or uses more memory.
\version "2.23.3"
\repeat unfold 5000 { c4( cis)-. }
Reduce unsmobbing during break substitution
substitute_grob (SCM, Grob *) needed to figure out what kind of scheme value it had been given, but that knowledge is present a little higher in the call chain. Split it into two functions for the two possible cases. Use templates to preserve the type information through a few levels of callers.
Combine and templatize Grob_array filter functions
- Roll filter_map2 into filter_map by using a variadic template.
- Likewise with filter_map_assign2.
Spanner: reduce calls to get_system ()
get_system () was called twice in the expected case, but it only needs to be called once.