In Java version you are using Streams which are lazy. Kotlin's map function is eager on an array. What if you replace "toTypedArray()" with "asSequence()"?
And of course, javaWay actually does nothing except constructing a stream, because you are not even consuming the stream. You need to call Collect on a Stream and toList() on Kotlin sequence to actually compare something.
If I change it to Sequence it create a new Sequence from the tranformation. so 4ms and it is faster than Java (47ms).
but when consuming both to a list, the kotlin version is faster, 260ms compared to 350ms.
However in java you can consume it to array. if you consume it to object[] it takes 260ms, but it takes 350ms to string[].