AugustNagro / utf8.java

Vectorized UTF-8 Validation for Java
62 stars 7 forks source link

Use static finals for LookupTables #4

Closed amCap1712 closed 3 years ago

amCap1712 commented 3 years ago

While working on #3, I observed that vectorization didn't take place the ASCII only case due to some reason. My hunch is that the lookup tables being not static are affecting performance for it. I attempted using static finals for the lookup table and the performance improved markedly. ~10-12x performance boost for the ASCII path.

Results: https://gist.github.com/amCap1712/948cd2c94d45a2ce183e2f2c7a7f2a0a

AugustNagro commented 3 years ago

This looks great, thanks!