Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think the question have been answered as YES a not interpreted language will in 99.99% of the cases run faster than the same algorithm under a VM. This said (having worked a lot in image processing both in java and c/c++ where memory and time mattered) I think you should at first try to optimize your code, here are are my advises:</p> <ul> <li>Try to find the bottleneck of your code using a profiler. A lot of things we sometimes omit can be reveled with such tools (like type casting, unnecessary creation of objects, most critical functions which should be optimized at first) A profiler have to be your friend.</li> </ul> <p>Then (just few examples I could see for raytracing):</p> <ul> <li>Replace tan/sin/cos by lookup tables (as long as you can) or <a href="http://lab.polygonal.de/2007/07/18/fast-and-accurate-sinecosine-approximation/" rel="nofollow">approximate functions</a></li> <li>Try to process data per array and not per sample</li> <li>Try using multiple threads</li> <li>…</li> </ul> <p>Now those things are "good" but if the speed is really critical for you, I would not suggest to use a c or c++ language (even if you could) but more likely to focus on OpenCL. This is probably the best tool available and most adapted for building ray tracings engine. Just imagine you are not talking there of an improvement of 30% but more likely 10'000% (100x faster) Here is a java interface: <a href="http://jogamp.org/jocl/www/" rel="nofollow">http://jogamp.org/jocl/www/</a> Good luck :-)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload