-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
For now this is a brain storming issue.
I believe our current thread pool is not optimal for processing render/ trace tasks.
For starters we should us template function as is clear from this little benchmark and this
boxdot, [30 Sep 2016, 15:33]:
#include <functional>
template<typename Fun>
void caller(const Fun&& f) {
f();
}
int main() {
long counter1 = 0;
long counter2 = 0;
long counter3 = 0;
long counter4 = 0;
for(size_t i=0; i<10000000; i++) {
auto lambda = [&]() {
counter1++;
counter2++;
counter3++;
counter4++;
};
caller(lambda);
}
}
// ./a.out 0.00s user 0.00s system 0% cpu 0.001 total
More over we should avoid deep recursions with trace
. My idea is too turn the recursive call in an iterative one. We should take inspiration from GPU renderers.
Metadata
Metadata
Assignees
Labels
No labels