raytracing - Java raytracer increase CPU usage -


i tried implement raytracer in java , works fine. once, rendering scene , checked cpu-usage of program. every virtual core being used overall cpu-usage around 22-23%

i know when rendering cinema4d every virtual core being used 100%.

how archive this? make raytracer run 4 times faster? (23% -> 100%)

you should able 100% cpu usage, , else being equal, doing should result in faster rendering speed. you're apparently not @ 100% indicates me you're either not creating enough threads, or threads blocking on something.

i've found sweet spot 1 rendering thread per virtual core. can use api detect number of cores available @ runtime, , spawn many rendering threads. example of this, see my java ray tracer.

every virtual core being used overall cpu-usage around 22-23%

i'm not sure mean this, may want dig using performance profiler better understand how threads using cpu. ideally want each of threads working time. use visualvm visualize process threads.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -