What really is to “warm up” threads on multithreading processing?
问题 I’m dealing with multithreading in Java and, as someone pointed out to me, I noticed that threads warm up, it is, they get faster as they are repeatedly executed. I would like to understand why this happens and if it is related to Java itself or whether it is a common behavior of every multithreaded program. The code (by Peter Lawrey) that exemplifies it is the following: for (int i = 0; i < 20; i++) { ExecutorService es = Executors.newFixedThreadPool(1); final double[] d = new double[4 *