Lecture notes in computer science vol:3132 pages:240-253
Logic Programming, 20th International Conference, ICLP 2004, Proceedings
Learning algorithms such as decision tree learners dynamically generate a huge amount of large queries. Because these queries are executed often, the trade-off between meta-calling and compiling & running them has been in favor of the latter, as compiled code is faster. This paper presents a technique named control flow compilation, which improves the compilation time of the queries by an order of magnitude without reducing the performance of executing the queries. We exploit the technique further by using it in a just-in-time manner. This improves performance in two ways: it opens the way to incremental compilation of the generated queries, and also gives potentially large gains by never compiling dynamically unreachable code. Both the implementation of (lazy) control flow compilation and its experimental evaluation in a real world application are reported on.