Re: [FFmpeg-devel] [PATCH] checkasm: Use a self-balancing tree

2015-09-26 Thread Henrik Gramner
On Sat, Sep 26, 2015 at 12:04 AM, Michael Niedermayer wrote: > ahh, ok, no objection from me then On Sat, Sep 26, 2015 at 12:53 PM, Ronald S. Bultje wrote: > lgtm. Thanks, applied. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.or

Re: [FFmpeg-devel] [PATCH] checkasm: Use a self-balancing tree

2015-09-26 Thread Ronald S. Bultje
Hi, On Fri, Sep 25, 2015 at 3:28 PM, Henrik Gramner wrote: > Tested functions are internally kept in a binary search tree for efficient > lookups. The downside of the current implementation is that the tree > quickly > becomes unbalanced which causes an unneccessary amount of comparisons > betwe

Re: [FFmpeg-devel] [PATCH] checkasm: Use a self-balancing tree

2015-09-25 Thread Michael Niedermayer
On Fri, Sep 25, 2015 at 10:06:41PM +0200, Henrik Gramner wrote: > On Fri, Sep 25, 2015 at 9:57 PM, Michael Niedermayer wrote: > > is there any reason why this doesnt use > > libavutil/tree.* ? > > Two reasons basically. > > First, the glue code required to use a generic tree implementation > ins

Re: [FFmpeg-devel] [PATCH] checkasm: Use a self-balancing tree

2015-09-25 Thread Henrik Gramner
On Fri, Sep 25, 2015 at 9:57 PM, Michael Niedermayer wrote: > is there any reason why this doesnt use > libavutil/tree.* ? Two reasons basically. First, the glue code required to use a generic tree implementation instead of one customized for this use case would be as large as the implementation

Re: [FFmpeg-devel] [PATCH] checkasm: Use a self-balancing tree

2015-09-25 Thread Michael Niedermayer
On Fri, Sep 25, 2015 at 09:28:26PM +0200, Henrik Gramner wrote: > Tested functions are internally kept in a binary search tree for efficient > lookups. The downside of the current implementation is that the tree quickly > becomes unbalanced which causes an unneccessary amount of comparisons between

[FFmpeg-devel] [PATCH] checkasm: Use a self-balancing tree

2015-09-25 Thread Henrik Gramner
Tested functions are internally kept in a binary search tree for efficient lookups. The downside of the current implementation is that the tree quickly becomes unbalanced which causes an unneccessary amount of comparisons between nodes. Improve this by changing the tree into a self-balancing left-l