tag:blogger.com,1999:blog-725906748590083291.post135758306332885873..comments2017-01-29T20:52:19.588-08:00Comments on Simple thoughts & complex stuff: final static boolean & JITpveentjerhttp://www.blogger.com/profile/17847641595368096163noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-725906748590083291.post-68443028034189213122017-01-26T06:47:26.306-08:002017-01-26T06:47:26.306-08:00Thank you for your reply.
Good point, it should a...Thank you for your reply.<br /><br />Good point, it should allow the inlining of the 'doMath' methods.<br /><br />However. now the calling method could be prevented from being inlined itself into an other method. Effectively the problem has been moved.<br /><br />Another other problem is that you don't want to litter the caller code with if(enabled)then this else that. If the 'doMath' method is used at more than 1 place, you need to solve the problem more than once. pveentjerhttps://www.blogger.com/profile/17847641595368096163noreply@blogger.comtag:blogger.com,1999:blog-725906748590083291.post-60339605127864603912017-01-26T06:41:09.180-08:002017-01-26T06:41:09.180-08:00If i understood your point correctly, you can divi...If i understood your point correctly, you can divide your "decider" method ('doMath' in your case) into two: one for ENABLED=true (let's call it 'doMathEnabled') and one for ENABLED=false ('doMathDisabled')<br /><br />Thus, in case of ENABLED=true 'doMath' and 'doMathEnabled' will be inlined without the influence of the size of 'doMathDisabled'.Anonymoushttps://www.blogger.com/profile/08719517004722116786noreply@blogger.com