Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure, but even in those cases the saving has to win back the overall cost of the runtime profiling and dynamic compilation. The crossover point seems to be high enough in the graph that it's not reached very often in practice - especially since, as you say, programmers tend to learn early on that hoisting conditions out of inner loops Makes Code Faster.


The crossover point seems to be high enough in the graph that it's not reached very often in practice

I remember a study posted here a few months back that supported the notion that most web apps have a certain "steady state" that they reach after they start up, where almost all the types of variables are known, and most of the funkier "dynamic" changes don't happen. If one can get a JIT to remember the tracing information from session to session, it should be able to run as fast as or faster than C.


But if they reach a steady state, then profile guided optimization can be used to make an AOT C compiler generate faster code too.


True, but let's say the implementation Lang in question has optional types. Consider the unfilled type information to be technical debt. If the tracing information can be exploited to automatically fill in the type info, then this is technical debt that magically repays itself. That's something startups should be interested in.


"Winning back" the overhead of the profiler + JIT is not terribly hard right now for long-lived processes. And unlike the assertions in Herb's original article this is not something that requires a mythical "sufficiently smart compiler" to make even better -- it just requires people to implement and fine-tune things we already know.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: