Baunsgaard commented on code in PR #2435:
URL: https://github.com/apache/systemds/pull/2435#discussion_r2821669477


##########
src/main/java/org/apache/sysds/hops/cost/CostEstimator.java:
##########
@@ -155,18 +155,16 @@ else if( pb instanceof BasicProgramBlock )
                                                //awareness of recursive 
functions, missing program
                                                if( !memoFunc.contains(fkey) && 
pb.getProgram()!=null ) 
                                                {
-                                                       if(LOG.isDebugEnabled())
-                                                               
LOG.debug("Begin Function "+fkey);
-                                                       
+                                                       LOG.debug("Begin 
Function " + fkey);

Review Comment:
   The main difference here, is that the LOG.isDebugEnabled() is very cheap, 
while the string concatenation can be very expensive. Unfortunately to call the 
LOG.debug java has to resolve the string variable input, and that is the main 
time used, especially if Logging is disabled. 
   
   I do not know if there is a way to avoid the string concatenation, or 
somehow getting it delayed to after the logging is analysed to be off.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to