Computer term of the day
Jan. 9th, 2015 09:17 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Heisenprofiling, verb: wasting unnecessary time trying to figure out why your inner loops are still running slowly after optimization, only to realize that it's because the profiler hooks are slowing it down...
(no subject)
Date: 2015-01-09 02:21 pm (UTC)(no subject)
Date: 2015-01-09 02:25 pm (UTC)(no subject)
Date: 2015-01-09 02:27 pm (UTC)Unless you are doing HFT, it's time to say "enough" and deal with aggregates of operations.
(no subject)
Date: 2015-01-09 02:41 pm (UTC)Problem was, I didn't *realize* it was down to a microsecond (and indeed, the higher-level function I actually cared about was down to five microseconds), until I realized that I was now mostly measuring residual noise from the profiler. I had actually achieved an 80% speedup, but *thought* I'd only achieved 20%, because of over-measurement, and was confused by the lack of progress.
Hence, Heisenprofiling...
(no subject)
Date: 2015-01-09 02:26 pm (UTC)Eventually I created an in-memory array, updated that with integer data which corresponded to information I wanted, and that was "fast enough" to expose the issue.
Many years later, on a Connection Machine, we discovered that asking for the current day/date would bring all processors to a screeching halt while the system propagated the correct date/time to every processor. Also while trying to profile behavior and performance.
It's not easy.