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

I think you are confusing the “meta-programming” and “run-time optimization” as described by the original article.

The JIT optimization you mentioned is actually his point 3, while I was addressing his point 2, “meta-programing” during compile-time. True, he mentioned in languages like Lisp where compile-time and runtime can be interleaved it would be a feasible solution, but he was focusing on statically-compiled features more in line with C++ templates, which I doubt would bring anything closer to what you were talking about.

C doesn't provide runtime profiling and optimization, but if performance is really critical, offline profiling to find hotspots and replacing them with pre-computed constants is a must. On average, the complexity and additional overhead brought by the JIT techniques probably won't offset the performance gain it buys compared to carefully profiled and optimized C.

PS. Why downvoting the grandparent comment?



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

Search: