XenoAmess opened a new pull request #108: URL: https://github.com/apache/commons-compress/pull/108
So I tried to make a refine for `BZip2CompressorOutputStream` yesterday. for conclusion, 1. adding the break seems at least not letting it slower. so we donot need to revert that change yesterday. 2. the codes right now is really fast. I mean, all of my refine tries seems no significant improvement for performance. 3. the refine method I tried: 3.0 class `BZip2CompressorOutputStream` is the original class without the break I added yesterday. class `BZip2CompressorOutputStreamBreak` is the version with added break. 3.1. class `BZip2CompressorOutputStreamXenoAmessInShort` : aims to use `short` instead of `boolean` in `Data.inUse` array, and use bit operations for copy/change. 3.2. class `BZip2CompressorOutputStreamXenoAmessInBoolean` : aims to inline more, and added some small changes. 3.3 class `BZip2CompressorOutputStreamXenoAmessInBoolean2` : aims to inline at LEAST methods as we can, and wholly trust JIT will give it a good C2. and the result of performance test shows that there are nearly no difference in speed actually, and `BZip2CompressorOutputStreamBreak` runs slightly (very slightly) faster than others. But, as all known, jmh is actually not a stable thing, so as the diffenerce are really small, I think it is the right time for me to surrender and stop trying to refine it using my tricky ways. And the `BZip2CompressorOutputStream` in master now is good. No need to revert the `break`. at least on win10, jdk13. Althought the refining-try failed, maybe the performance test codes and the "refined"(or, variant actually, as they does not refine anything) classes might be useful. I just put them in the test folder, and maybe next time when some guy wanna refine this class, they can at least know in what ways I failed and stop waste time on it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
