OpenFrameworks vs Processing implementation

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? Is there any other reason, besides Openframeworks being written in C++, that Openframeworks is faster than Processing?

Thanks!

One of the main reasons openFrameworks can be faster than processing is because it does not require a virtual machine layer in between the code and the hardware. That said, Java has some very fast JIT compilers and native code bindings that make it very fast under some circumstances.

It is difficult to compare implementation efficiency / speed specifics generally. Is there a specific feature or implementation you’re trying to compare?

You came in to the irc channel and asked this question, I’ll paraphrase what I said there:

What is “faster”? Time to first pixel? Time to first delight? Time to calculate 1+1?

Neither processing or openframeworks are necessarily inefficient at anything they are doing. Very talented programmers are behind both projects. Both projects basically do the same thing: expose the the OpenGL API in a way that is approachable for beginners, and useful for experts.

If your code is slow, write code that runs faster. I bet I could take any processing program that runs slower than the OF counterpart and optimize the code using java language features to beat the OF framecount. I could also do the same for an OF program against a processing app.

If you care about performing parallel vector arithmetic at the fastest speed imaginable, you can use CUDA/OpenCL/SIMD/AVX extensions from any language.

The real question to ask here is: what is more capable? What version of openGL is exposed to the programmer? What has better cross platform support. Which has a better API design? What do I like using more? What makes me happy? Whatever makes you happiest is the most performant framework, I guarantee it. Code that is never written is never run.

1 Like