Why HashMap put so much faster after jdk8?

Why does this class, built with Java 8, run 7.5x faster on Java 11 than Java 8?

import java.time.Duration;
import java.time.LocalDateTime;
import java.util.HashMap;

public class JMapSpeed {

  public static void main(String[] args) {

    HashMap<Integer, Integer> map = new HashMap<>(10_000_000);

    LocalDateTime start=LocalDateTime.now();

    for (int n=0; n< 10_000_000; n++) {

    LocalDateTime stop= LocalDateTime.now();
    System.out.println("Duration: " + Duration.between(start, stop).toMillis());
    System.out.println("Iterations: " + map.size());
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum