logoalt Hacker News

thayne • today at 4:30 AM • 1 reply • view on HN

Does the JIT compiler not do a good enough job at optimizing code that can take advantage of SIMD to just use java code for base64?


Replies

samus • today at 4:39 AM

Automatic loop vectorization is unreliable since even small innocent-looking code changes can thwart loop shape detection and introduce optimization barriers. Apart from that the JIT is under a tight runtime budget, unlike an AOT compiler.

The Vector API was introduced to communicate intent more clearly to the JVM and to make optimizations more reliable. Unfortunately it is currently still incubating to make adapting it to Project Valhalla possible.