Files
filament/tools
Mathias Agopian a60fe41681 performance improvements to JobSystem
- reduce the number of calls to notify_one() and notify_all().
  notify_one() is not only called when running a new job, and
  notify_all() only when a job finishes.

- don't hold the condition lock while calling notify_*(), as it is not
  strictly needed, and because notify_*() can be very slow, there can
  be a lot of contention on this lock as a result; blocking the whole
  jobsystem thread pool.

- add a new version of run() that takes an opaque thread id that can
  be retrieved from a job's execute function; this is especially
  intended to be used by parallel_for(); it's just a more efficient
  version of run() that avoids a hashmap lookup.


Overall these change yield a significant performance boost:
- running + waiting a job: +200%
- running many jobs: +150%
- running many jobs in parallel: +50%
2024-07-22 11:12:51 -07:00
..
2023-03-23 09:31:01 -07:00
2023-09-20 10:16:55 -07:00
2023-09-20 10:16:55 -07:00
2023-09-20 10:16:55 -07:00
2023-09-20 10:16:55 -07:00
2024-01-17 11:04:42 -08:00
2023-09-12 20:28:46 +00:00
2023-09-20 10:16:55 -07:00