4 ms·
My project took 2306 milliseconds to perform specific performance tests before JVM 15. But, JVM 15(or higher) took 24248 milliseconds. I've heard that this iss
by devjeonghwan 5y ago
My project took 2306 milliseconds to perform specific performance tests before JVM 15. But, JVM 15(or higher) took 24248 milliseconds.
I've heard that this issue is related to "JEP 374". (It's a matter of disabling biased locks. Corresponds to "ByteArrayInput/OuputStream" which I use some.)
So, I fixed it. Now it is more optimized.
It takes 1670 milliseconds.
- exabrial 5y agoWhy is ByteArrayInput/OuputStream the lynchpin?
- deleted 5y ago[deleted]
- devjeonghwan 5y ago"Read/write" method of "Input/OutputStream" are not synchronized. but "ByteArrayInput/OutputStream" are synchronized methods. Old version opack call "read/write" method frequently, but only call from single thread. (not allow multiple thread use to one context) before JVM15, synchronized "read/write" method of "ByteArrayInput/OutputStream" was cheap, when single thread going through. (use biased locking) "JEP 374" has a performance penalty for single threads going through syncrozied blocks.
- exabrial 5y agoInteresting. A _lot_ of libs use ByteArrayInput/OutputStream extensively, this could have some deep reaching effects.