Optimize RandomTreeTrainer.

Replacing vectors with base::Optional in constant {target, feature}
value detection results in ~20% reduction in runtime on the Fisher
iris ExtraTrees test with nominal features.  (~420 msec => ~335 msec
locally).  Note that the features really are numeric, so one-hot
conversion to nominal results in over 100 nominal features.

For reference, the same test with numeric features takes about
20 msec either way.

Change-Id: Ib938914b867b4247579d04fe298b7326c10151ec
Reviewed-on: https://chromium-review.googlesource.com/c/1394798
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620830}
1 file changed