3 ms·
I can just about believe that this kind of scenario might be a very rare exception where the performance difference is relevant and you might want to do somethi
by tczajka 3y ago
I can just about believe that this kind of scenario might be a very rare exception where the performance difference is relevant and you might want to do something else.
Still, color me skeptical.
"In simple enough scenes"? OK perhaps, but we don't want to only run ray tracing for very simple scenes. Simple scenes are those cases where you probably don't need much calculation, so does it really matter that 5-10% of that simple calculation is RNG? It's the complicated computation-heavy scenes that matter!
Also, one would have to see the code to judge this. For instance, maybe that code was wasting random bits a lot?
- nullc 3y agoIn the sorts of searches I often do, like fitting integer solutions to fast function approximations, searching for error correcting codes, and randomized SAT-like problems, or simulating usage of data structures for benchmarking them chacha is slow enough to meaningfully influence (even dominate) the runtime. I wouldn't want to use rand() because it's extremely likely that it will produce actually bad results. I agree one should use a CSPRNG like chacha (or rdrand) if its runtime is insignificant but then the question is: whats the best choice when it's not insignificant? Using rand is a bad idea.