Open hucheng opened 9 years ago
now the time complexity of AliasTable construction is O(n), no sorting needed.
I changed the AliasTable prob type from Double to Float, then again to generics (it can also be Int or Long too). The Int prob AliasTable is used in BBR Partitioner.
Great. If int-typed probability would affect the sampling precision?
No, it wouldn't.
Several opportunities in optimizing aliasTable: