Both Java Mode & Python Mode are compiled as Java bytecode and run by a Java VM.
But the "quality" of the generated bytecode varies between them.
For example, in Java we generally use primitive datatypes to represent numerical values.
But in Jython, everything is an object, even the numbers! @-)
P.S.: Python Mode relies on Processing's API, which is written in Java.
Therefore when using them, it's in Java's territory and got the same performance as Java Mode! :D
Python Mode sketches are interpreted, and are much, much slower than Java mode sketches. It's true that when you call a function (such as box() or ellipse()), that function is the same function called by a Java mode sketch, and therefore the same speed. But your own sketch code--your loops, your arithmetic, etc.--is much slower than it would be in Java mode.
Answers
https://forum.Processing.org/two/discussions/tagged/jython
So, If I understand well it's the same speed.
P.S.: Python Mode relies on Processing's API, which is written in Java.
Therefore when using them, it's in Java's territory and got the same performance as Java Mode! :D
https://www.SafariBooksOnline.com/library/view/jython-essentials/9781449397364/ch01s05.html
https://www.Quora.com/How-does-Jython-work-Can-Jython-improve-Python-performance
GoToLoop's answer is incorrect.
Python Mode sketches are interpreted, and are much, much slower than Java mode sketches. It's true that when you call a function (such as
box()
orellipse()
), that function is the same function called by a Java mode sketch, and therefore the same speed. But your own sketch code--your loops, your arithmetic, etc.--is much slower than it would be in Java mode.Ok, thanks it's what I wanted to know. So for learning and simple sketch, it's perfect.