Performance Comparision - Java Snippet vs Python

Hi @mojito_insano,
Welcome to the KNIME forum! Did you know that the new Python Snippet nodes run significantly faster when you enable the columnar table backend? Here’s a blog post about it: KNIME Columnar Table Backend Boosts Performance | KNIME (Note: the backend and the nodes are now out of labs). If you haven’t yet, I would try that before considering other options.

Regarding Java: beware not to mix up Java and JavaScript. The Java Snippet runs Java, JavaScript is used in our Column Expression and Generic JavaScript View nodes. I do not think that JavaScript is any faster than Python at all and the Java Snippet only works on row-wise operations, your code never has access to the full table. So depending on your use case it might not be an option. If it is, the Java Snippet can be faster than the Python Script because it works directly on the data format that KNIME uses internally. As said above, though: with the new table backend the Python nodes are also pretty fast!
Kind regards,
Alexander

3 Likes