Skip to content

Instantly share code, notes, and snippets.

@telendt
Last active March 31, 2021 18:45
Show Gist options
  • Save telendt/546eff341f26e53947b940580e844588 to your computer and use it in GitHub Desktop.
Save telendt/546eff341f26e53947b940580e844588 to your computer and use it in GitHub Desktop.
Kotlin compilation time (map type inference)
#!/usr/bin/env bash
export JAVA_OPTS="--add-opens java.base/java.util=ALL-UNNAMED"
for i in {500..3000..500}; do
echo $i items
python3 -c 'print("val x = mapOf(" + ",".join(f"\"{i}\" to {i}" for i in range('$i')) + ")")' > /tmp/test.kt
time kotlinc -nowarn /tmp/test.kt
rm /tmp/test.kt
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment