We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
a friend and I have started to argue about this issue lately. We all know that OpenFrameworks is written in C++ while Processing is Java. While that alone justifies that OpenFrameworks is faster than Processing (on the other sideProcessing is more straight forward) my friend states that OpenFrameworks implementation is much better than Processing. Anyone who knows about his can confirm that it is true? Does OpenFrameworks is better implemented than Processing?
Thanks!
Answers
This, by itself, is not true. This is an outdated opinion that isn't really backed up by any facts.
What does "better implemented" even mean? Arguments like this are almost always pointless, put forth by people who don't really know what they're talking about.
Languages are tools. Different tools are better suited for different jobs, or for different people. There really isn't any such thing as "better" or "worse" when it comes to this kind of generalization.
Even though I've never used OF, I expect it to be better.
Otherwise, what's the point on using a more diff. language like C++ after all?
Well, there's 1: We might need a 3rd-party library which exists in C/C++ only! ;;)
Any hardware related lib in Java is simply a wrapper for some C/C++ 1! 8-X
@KevinWorkman I never said that any of the tools is better than another. I just stated the fact that OpenFrameworks is faster than Processing, which is not a surprising, since C++ itself is faster than Java, while Java needs to run on a virtual machine and has a garbage collector (a great advantage when it comes to multiplatforming and also on memory management). My question itselft is if the speed of OpenFrameworks, compared to Processing, is major due to the languages itself or due to different implementations/approaches the programmers took. Again, I'm quite experienced Java Programmer and C++ programmer.
Obviously, "Java Mode" & OF frameworks got very different internal implementations.
Since C/C++ got direct access to hardware, especially OpenGL, w/o needing any Java wrappers of course, it tends to be faster obviously.
But still C++ got clunky header files and class implementations. And we need to delete every object ourselves! >-)
But in the end, you gotta check those framework sources in order to be sure of their quality.
Here's Processing API: https://github.com/processing/processing/tree/master/core/src/processing
And I never said that you said one thing is better than another. You said that your friend said that. I am arguing with your friend, not you. This is apples and oranges, or wrenches and hammers. Different tools for different jobs.
And this is what I'm disagreeing with. What does it mean for one language to be faster than another? In what environment? With what program?
It doesn't really mean anything when you say "C++ is faster than Java". Sure, Java used to have performance issues, but technology has come a long way, and now Java has equivalent or better performance than other languages. Your friend, and apparently you, need to update your sweeping generalizations.
If you have a specific question about a specific part of Processing, we can help. But right now it looks like you just want to troll a Java forum.
Programing language & available hardware APIs obviously place OF in the upper hand IMO.
In order to access OpenGL and other GPU resources, Java needs a JNI wrapper over a C API. Thus increasing indirection!
However, framework's code quality implementation is more important.
In order to know how well Processing & OF implemented their APIs, we gotta study their source code and measure their performance! ;;)
Bumping this thread to see the current status of comparisons.