logoalt Hacker News

theanonymousone • today at 8:18 AM • 1 reply • view on HN

> Two small edits close most of it: compute the loop bounds into locals before the loop,

I always assumed any decent runtime/compiler takes care of such optimisations, and usually leave such things to JDK in my Java code. Is that really not the case?


Replies

RandomOnyx • today at 8:37 AM

Decent ones do. .NET's JIT has historically (before ryujit especially and tbh I haven't looked at .NET much in the past decade) not been decent, general statements about decent compilers never applied to it. It has been playing catch-up lately but apparently it still has a ways to go.

➕ show 2 replies