Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1121)

Issue 4129050: Introduce Beam_scoring_problem::quant_range, for quickly filtering out invalid positions. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 2 months ago by hanwenn
Modified:
13 years, 2 months ago
Reviewers:
mike, MikeSol, mikesol, Graham Percival (old account)
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Introduce Beam_scoring_problem::quant_range, for quickly filtering out invalid positions. This reduces the number of scoring passes from 40k to 20k in morgenlied.ly with #'region-size = 4.

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix tremolo beams. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -11 lines) Patch
M lily/beam-quanting.cc View 1 4 chunks +49 lines, -11 lines 0 comments Download
M lily/include/beam-scoring-problem.hh View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9
hanwenn
Introduce Beam_scoring_problem::quant_range, for quickly filtering out invalid positions. This reduces the number of scoring passes ...
13 years, 2 months ago (2011-02-04 11:45:37 UTC) #1
MikeSol
LGTM, but I can't do a regtest today :( http://codereview.appspot.com/4129050/diff/1/lily/beam-quanting.cc File lily/beam-quanting.cc (right): http://codereview.appspot.com/4129050/diff/1/lily/beam-quanting.cc#newcode215 lily/beam-quanting.cc:215: ...
13 years, 2 months ago (2011-02-04 12:08:04 UTC) #2
Graham Percival (old account)
On 2011/02/04 12:08:04, MikeSol wrote: > LGTM, but I can't do a regtest today :( ...
13 years, 2 months ago (2011-02-04 13:16:15 UTC) #3
hanwenn
On Fri, Feb 4, 2011 at 10:08 AM, <mtsolo@gmail.com> wrote: > LGTM, but I can't ...
13 years, 2 months ago (2011-02-04 15:19:43 UTC) #4
mikesol_ufl.edu
On Feb 4, 2011, at 10:19 AM, Han-Wen Nienhuys wrote: > On Fri, Feb 4, ...
13 years, 2 months ago (2011-02-04 15:30:47 UTC) #5
mike_apollinemike.com
On Feb 4, 2011, at 10:30 AM, Mike Solomon wrote: > On Feb 4, 2011, ...
13 years, 2 months ago (2011-02-04 19:35:31 UTC) #6
hanwenn
On Fri, Feb 4, 2011 at 1:30 PM, Mike Solomon <mikesol@ufl.edu> wrote: > On Feb ...
13 years, 2 months ago (2011-02-05 12:40:04 UTC) #7
mikesol_ufl.edu
On Feb 5, 2011, at 7:40 AM, Han-Wen Nienhuys wrote: > On Fri, Feb 4, ...
13 years, 2 months ago (2011-02-05 15:51:06 UTC) #8
hanwenn
13 years, 2 months ago (2011-02-07 14:08:39 UTC) #9
On Sat, Feb 5, 2011 at 1:51 PM, Mike Solomon <mikesol@ufl.edu> wrote:

>>> True, although I think it's important to account for all beaming cases if
possible.
>>
>> This is a performance optimization, ie. a way to run collision
>> detection without performance impact if the object does not really
>> collide, so it does not need to deal with all cases.
>>
>
> From reading the code (correct me if I'm wrong), the upper collision in the
attachment would be taken into account because its stems all point in the same
direction, whereas the bottom one would not because its first and last stem do
not completely reflect the beam's stems' directions.

?

I'm intending to short-cut situations like the one in the image
attached; the lower note head is outside the range allowed for the
beam, so it makes no sense checking it for collisions.

> Is there any way that I could measure what type of performance hit LilyPond is
taking with this more robust beam-collision code?  I am not really qualified to
speak to what type of trade-off is acceptable, but it'd be good to have an
actual benchmark to make the comparison.

You can get a rough impression using ly:beam-score-count.  Another
option is to run a profile on a beam-heavy piece.  The last time I did
that, IIRC, beam scoring was ~ 10% of total time spent: not enough for
it to be worth optimizing a lot, but important enough that making it
much slower will be noticeable.  This was a long time ago, so, the
balance of expenses may have changed though.

--
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b