News for hackers. Stuff that matters.
Re:How does LuaJIT's trace compiler work? by rayiner on Friday November 29, 2013 @12:12PM (#6820159)
A static compiler has to generate code that handles every possible path through the code. This tends to pessimize code downstream of a control flow merge point, because such code has to be compiled assuming it can be reached via multiple paths. A trace compiler can compile only the paths that are actually taken on a given workload, and compile the (dynamically) uncommon cases into exits to the interpreter.

The firewall rule example Mike Pall gives is a pretty good one. You have code that has many different paths through it, but only specific ones are triggered, dynamically, by a particular attack. Those can be compiled into traces that assume the other paths are not taken (except to guard the possible control flow splits with trace exits). This can allow an optimizer to make much more aggressive assumptions on the actually-taken paths.

Re:How does LuaJIT's trace compiler work? by JoeAltmaier on Saturday November 30, 2013 @09:47AM (#6823265)
My point exactly. This slight optimization is all you get. I think this technology is being oversold if that's all they got.