#Hey o so I am doing some mesh generation
1 messages · Page 1 of 1 (latest)
seems like both processes r blocked by the same race condition (the generation) so the performance should be around the same
Well the difference would be doing multiple loops vs a single one, and having multiple jobs that execute in order vs a single job that does it all.
It is doing the same work either way, so I think it would be about the same...
I can't see two jobs ever being faster than doing it in one job. Is this not a IJobParallelFor?
Best case scenario, it's a parallel job, which means the second job can begin processing vertices that are ready before the first job completely finishes, if there are worker threads available.
But even in that best case scenario, it still can't be faster than doing it all in the first job. Only just as fast.
Yeah it is a IJobParallelFor. How could the second job start before the first finishes? It isn't deterministic in which order or 'how fast' a job runs
I guess time to look in to seeing if you can use delegates with jobs. Or maybe just a native array of an interface... I don't think it supports that though. Otherwise I am going to have to put it all in one struct with a bunch of bool toggles and it is going to be real ugly.
Do you know of a way to have a NativeArray of interfaces, by chance?
I feel like there must be, because Entities must do something like this for its components
(Nvm, asking in the DOTS channel https://discord.com/channels/489222168727519232/1109538169629712454. Thanks for the help)
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
Function pointers are supported, though I don't know if you can have a NativeArray of them.
https://docs.unity3d.com/Packages/com.unity.burst@1.8/manual/csharp-function-pointers.html