On 18 February 2013 13:39, Hengqing Hu <hengqing...@gmail.com> wrote: > Thanks for spending time to investigate.
Sure. > > One thing I'd like to point out, the intention of use hash-length > in remove-unrelated-blocks is to avoid furthur processing > if all blocks are related. This involves the assumption that the sizes of hash-tree and hash-table are equal. It is hard to verify this due to the not trivial construction of hash-tree. I have not profiled the code but it is clear that most of the processing happens in build-interval-tree-table and build-hash-tree. The final part for removing the unrelated items is nothing compared to that. At the small expense of sometimes doing the final loop when it could have been avoided, you gain an procedure that is more easily verified. I suspect that remove-unrelated can be restructued to use two loops at most, but don't have time further to consider it. Anyway, enjoy.