Login  Register

Re: Solution found, Problem with creating more VBO Buffers

Posted by jmaasing on Mar 01, 2017; 12:51pm
URL: https://forum.jogamp.org/Problem-with-creating-more-VBO-Buffers-tp4037689p4037708.html

elect wrote
adi wrote
Multiplikation are slower than shifts.
And what is it with ((maxPoints<<1)+maxPoints)<<2 ) or maxPoints*3 :-)
Ah, nice trick
Well that was true for some CPUs a long time ago. Both the javac compiler, the runtime and even the CPU will recognize what *2 or /2 means and use the most efficient way. Use the one that is more readable for humans and the compiler will handle it.

http://softwareengineering.stackexchange.com/questions/250635/when-i-test-out-the-difference-in-time-between-shifting-and-multiplying-in-c-th