English is below.
Опытные литкодеры знают, насколько нестабильны результаты бенчмарков решений на LeetCode. Одно и то же решение может показывать результаты с большим разбросом. Видимо, они начали что-то с этим делать и на днях изменили подход к замерам:
«Previously, the runtime calculation included overhead processes, but now we only measure the actual time your code takes to run.»
Вольный перевод: Раньше в замеры попадало время холодного старта приложения, а теперь измеряется только время выполнения кода.
С точки зрения бенчмаркинга, это правильное решение. Время холодного старта может значительно искажать результаты микробенчмарков. Однако, это изменение сломало систему рейтинга существующих решений.
Для тех, кто ориентируется только на Big O нотацию, это не должно создать проблем. Остальным придётся смириться с тем, что их старые результаты станут невалидны. Новые решения могут выполняться всего за несколько миллисекунд, тогда как этот же код ранее выполнялся за 100+ мс. При этом на диаграмме отображаются как новые результаты, так и старые, что приводит к тому, что почти любая новая отправка решения приводит к «Beats 100.00%».
👩💻 LeetCode broke the solution ranking
Experienced LeetCoders know how unstable the benchmark results can be on LeetCode. The same solution can show results with a big variation. It seems they started fixing it and recently changed the way they measure performance:
«Previously, the runtime calculation included overhead processes, but now we only measure the actual time your code takes to run.»
From a benchmarking perspective, this is the right decision. Cold start can significantly spoil the results of microbenchmarks. However, this change has broken the rating system for existing solutions.
For those who focus only on Big O notation, this shouldn't create any problems. All others have to accept that their old results became invalid. New solutions may run in just a 1-2 milliseconds, while the same code previously ran in over 100 ms. At the same time, both new and old results are displayed on the diagram, leading to nearly any new submission of a solution being marked as «Beats 100.00%».
