[catboost] remove one TODO and add another
#error "sorry, not expected to work on 32-bit platform"
#endif
+// TODO(yazevnul): current implementation invokes `Get<PrimitiveType>ArrayRegion` with `mode=0`
+// which which asks JRE to make a copy of array [1] and then we invoke
+// `Release<PrimitiveType>ArrayElements` with `mode=0` which asks JRE to copy elements back and free
+// the buffer. In most of the cases we have no need to copy elements back (because we don't change
+// them), and in some cases we can use that and avoid alocation of our own arrays.
+//
+// [1] https://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/functions.html
+
#define Y_BEGIN_JNI_API_CALL() \
try {
@@ -274,7 +282,6 @@ JNIEXPORT jint JNICALL Java_ai_catboost_CatBoostJNI_catBoostModelPredict__J_3F_3
numericFeatureCount)
: TConstArrayRef<float>();
Y_SCOPE_EXIT(jenv, jnumericFeatures, numericFeatures) {
- // TODO(yazevnul): what is the last argument meaning?
if (numericFeatures) {
jenv->ReleaseFloatArrayElements(
jnumericFeatures,
