JVM small optimization in temporary vals elimination

This commit is contained in:
Dmitry Petrov
2021-11-30 11:25:34 +03:00
committed by TeamCityServer
parent f3ca0afd34
commit 52a3713c9c
@@ -82,6 +82,10 @@ class TemporaryValsAnalyzer {
}
}
// Don't run analysis if we have no potential temporary val stores.
if (potentiallyTemporaryStores.isEmpty())
return emptyList()
// If the method is big, and we couldn't eliminate enough temporary variable store candidates,
// bail out, treat all variables as non-temporary.
// Here we estimate memory required to store all relevant information as O(N * M * K),