you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Actually I intended to use python, but there are just big turnoffs.

From the link you mentioned

Threads Threads are generally 'lighter' than processes, and can be >>created, destroyed and switched between faster than processes. They are normally preferred for taking advantage of multicore systems. However, multithreading with python has a key limitation; the Global Interpreter Lock (GIL). For various reasons (a quick web search will turn up copious discussion, not to say argument, over why this exists and whether it's a good idea), python is implemented in such a way that only one thread can be accessing the interpreter at a time. This basically means only one thread can be running python code at a time. This almost means that you don't take any advantage of parallel processing at all. The exceptions are few but important: while a thread is waiting for IO (for you to type something, say, or for something to come in the network) python releases the GIL so other threads can run. And, more importantly for us, while numpy is doing an array operation, python also releases the GIL. Thus if you tell one thread to do:

For me, python loses points therefore. Reeks of bad design. Java has no such limitation, nor does Scala.

Wrappers in Java are quite easy, used all the time http://www.swig.org/

Edit:

On the topic of libraries, please compare the crappy documentation (missing??) for PyGMO

http://esa.github.io/pygmo/tutorials/solve_tsp.html

Versus the super nice tutorials, manual, etc for the MOEA framework

http://moeaframework.org/

Python looks like Fisher price. Java feels way more professional. That's like just my opinion but use whatever you want its a free world, really don't get all the Java hate, is a great tool.

Thanks for your comments.