rcurtin commented on this pull request.


> @@ -34,8 +34,7 @@ void BuildFastMKSModel(FastMKS<KernelType>& f,
     // Create the tree with the specified base.
     Timer::Start("tree_building");
     metric::IPMetric<KernelType> metric(k);
-    typename FastMKS<KernelType>::Tree* tree =
-        new typename FastMKS<KernelType>::Tree(referenceData, metric, base);
+    typename FastMKS<KernelType>::Tree tree(referenceData, metric, base);
     Timer::Stop("tree_building");
 
     f.Train(tree);

We should use `std::move(tree)` here to avoid copying the entire tree---that 
will be a big speed improvement.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/799#pullrequestreview-13852662
_______________________________________________
mlpack mailing list
[email protected]
http://knife.lugatgt.org/cgi-bin/mailman/listinfo/mlpack

Reply via email to