3 ms·
Long ago, I was asked to fix a bug about a user interface hanging when too many items were added. After poking around, I discovered that there was an algorithm,
by greenyoda 11y ago
Long ago, I was asked to fix a bug about a user interface hanging when too many items were added. After poking around, I discovered that there was an algorithm, whose run time was an exponential function of the number of items, that was taking several minutes to run (after which the UI would be responsive again). The punch line was that this algorithm was actually computing a value that was never used by the rest of the code, so I just deleted it. That was in C++ code written by an experienced developer.