java - Py4J has bigger overhead than Jython and JPype -


after searching option run java code django application(python), found out py4j best option me. tried jython, jpype , python subprocess , each of them have limitations:

  • jython. app runs in python.
  • jpype buggy. can start jvm once after fails start again.
  • python subprocess. cannot pass java object between python , java, because of regular console call.

on py4j web site written:

in terms of performance, py4j has bigger overhead both of previous solutions (jython , jpype) because relies on sockets, if performance critical application, accessing java objects python programs might not best idea.

in application performance critical, because i'm working machine learning framework mahout. question is: mahout run slower because of py4j gateway server or overhead mean invoking java methods python functions slower (in latter case performance of mahout not problem , can use py4j).

i don't know mahout. think that: @ least jpype , py4j have performance impact when converting types java python , vice versa. try minimize calls between languages. maybe it's alternative code thin wrapper in java condenses many javacalls 1 python2java call.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -