snuyanzin commented on code in PR #29418:
URL: https://github.com/apache/flink/pull/29418#discussion_r4208116015


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/generated/CompileUtils.java:
##########
@@ -73,6 +75,37 @@ public static void cleanUp() {
         COMPILED_EXPRESSION_CACHE.cleanUp();
     }
 
+    static final String WARM_UP_CLASS = "JaninoWarmUp";
+    static final String WARM_UP_CODE =
+            "public class JaninoWarmUp { public long eval(long a, long b) { 
return a + b; } }";
+
+    private static final AtomicBoolean WARMED_UP = new AtomicBoolean(false);
+
+    /**
+     * Compiles a throwaway class on a daemon thread so the Janino compiler is 
loaded and JIT-warmed

Review Comment:
   local results
   | N (warm-ups) | cold compile (ms) | after N runs (ms) |
   |---:|---:|---:|
   | 1 | 146 | 34 |
   | 5 | 142 | 20 |
   | 10 | 142 | 14 |
   | 20 | 143 | 14 |
   | 30 | 143 | 13 |
   | 40 | 141 | 13 |
   | 50 | 145 | 14 |
   | 60 | 143 | 17 |
   | 70 | 143 | 12 |
   | 80 | 140 | 13 |
   | 90 | 146 | 12 |
   | 100 | 145 | 13 |



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to