Closed samreid closed 5 months ago
@matthew-blackman and I agreed to close this issue because performance seems reasonable. If we need a performance boost in the future, we will use profiling+optimizing. Closing.
Going to reopen this issue. For https://github.com/phetsims/qa/issues/1060 with a Lenovo 100e Chromebook, it took between 9 and 12 seconds to autogenerate a sample when n=40 on the sampling screen. On other screens, it takes between 1-2 seconds.
There was an O(n^2) loop condition that was taking >50% of the CPU in that case. On my macbook air M1 it took roughly 1130ms to run one 40 autogenerate sample.
In the commit, I optimized the while loop condition so it is no longer O(n^2) and it now takes roughly 484ms on my device. This is taking 43% of the time. If that translates to the chromebook, then 12 seconds may go to 5.1s.
Wow! Performance is much better on the Chromebook...only a short delay (< 3 seconds). Can we close this now @samreid?
Yes, that seems great! Thanks for testing. Closing.
From #146,