Closed BraulioSanchez closed 3 years ago
Why should this be more efficient? Do you have benchmark measurements?
Yes, we have a benchmark considering all the data sets used in the article. The efficiency of this algorithm is sensitive to the number of dimensions. We use a data set of 25 dimensions and 25k instances, we compare the execution time of this implementation (14 sec) with the original one (4 sec). The bottleneck is in the getDensities method of the TreeStrategy class.
Sorry that I have not been more responsive. Too many duties. Your patch undoes two changes: (i) lazy initialization of the children map, (ii) null checks location in the density function. Did you benchmark both separately? It's always a bit tricky to predict Hotspot performance. Often the shorter code yields shorter bytecode, which may end up being optimized better; that is why I did this one-liner for the recursive calls.
Can you try 00824854dc7a4daa0489ce3513434a6cd202a57c with your benchmark suite? Thank you.
Codecov Report
93.67% <100.00%> (ø)
39.41% <0.00%> (-2.92%)
48.86% <0.00%> (-2.28%)
90.55% <0.00%> (ø)
Continue to review full report at Codecov.