utf8.java
utf8.java copied to clipboard
Vectorized UTF-8 Validation for Java
https://openjdk.java.net/jeps/414 The JEP mention improvements such as: > Enhancements to the API to support operations on characters, such as for UTF-8 character decoding. Specifically, we add methods for copying characters...
especially on graalvm EE which has some advanced optimizations (In graalvm JIT, not graalvm native which is universally slower)
This Java code can be 'fast' but not nearly at the speed of a C implementation. I believe that the reason is this code section: ``` ByteVector byte1High = prev1.lanewise(LSHR,...