clearspring/stream-lib — pull request #23 by seancarr (2013-04-04 18:17:42+00:00)
Title: add ability to disable sparse representation

1. add ability to disable sparse representation
2. set sort threshold based on the sparse set threshold

I did some memory profiling with YourKit and the sparse representation is taking up a ton of space. For p=15,sp=20 I was seeing the NORMAL RegisterSet use 68kB but the sparse set List was using over a megabyte. I'll look into some ways to optimize it but I think it'll require using an array rather than a List, which makes things more complicated. Either way, I think it is useful to have an option for disabling the sparse representation because it has performance overhead that may be undesirable in some cases.