#did anyone build something like, "if > 10000 entities, do parallel, otherwise single thread"?

1 messages · Page 1 of 1 (latest)

neat pier
#

i've been playing around with parallel/single thread with my jobs, and sometimes switching to single thread have performance gain at lower entity count. i'm sure i can figure something out(like auto profile time and dynamically set threshold), just wondering if anybody has done something similar.

weary prawn
#

typically the performance gain you look for is main thread time

you may also want to factor in the fact that if you run your code on the main thread, despite the fact that it's faster for that specific operation, you cannot run other operations on the affected components at the same time; you are effectively creating sync points

neat pier
#

yes. i am measuring system time as whole.

#

i think for some of the jobs the overhead is high enough that its just not worth it

#

the difference is pretty minor (max 10%)

#

but not nothing