in theory kotlin-native can solve all of this because they do not need to worry about backwards compatibility with type erasure and can do things like specialization without worrying about being compatible. Unfortunately, right now its significantly slow so writing anything numerical directly in k/native to be called from the JVM would make things worse not better.