title: XGBoost predict_proba slow inference performance
body: <p>I trained 2 gradient-boosting models on the same data, using Scikit-learn and XGBoost.</p>
  <p>Scikit-learn model</p>
  <pre><code>GradientBoostingClassifier(
      n_estimators=5,
      learning_rate=0.17,
      max_depth=5,
      verbose=2
  )
  </code></pre>
  <p>XGBoost model</p>
  <pre><code>XGBClassifier(
      n_estimators=5,
      learning_rate=0.17,
      max_depth=5,
      verbosity=2,
      eval_metric=&quot;logloss&quot;
  )
  </code></pre>
  <p>Then I checked inference performance:</p>
  <ul>
  <li>Xgboost: 9.7 ms ± 84.6 µs per loop</li>
  <li>Scikit-learn: 426 µs ± 12.5 µs per loop</li>
  </ul>
  <p>Why XGBoost is so slow?</p>