"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Jesper de Jong wrote:Can you post your code, and the code that you use to run the test?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Jeff Verdegan wrote:However, one might speculate that, among that hoodoo magic optimization that Jesper mentioned, having the variable there results in Bint.INT being preloaded and cached, and later references to Bit.INT being recognized as that same value, whereas without it, for whatever reason, it's not noticed that all those Bits.INT reference the same thing, and so it's looked up each time.
Just a little Friday mornin' guessin'.
Winston Gutkowski wrote:
Jeff Verdegan wrote:However, one might speculate that, among that hoodoo magic optimization that Jesper mentioned, having the variable there results in Bint.INT being preloaded and cached, and later references to Bit.INT being recognized as that same value, whereas without it, for whatever reason, it's not noticed that all those Bits.INT reference the same thing, and so it's looked up each time.
Just a little Friday mornin' guessin'.
Oddly enough, that was my thought too (obviously great minds think alike), but it doesn't explain why it would affect the static method, nor why that one should take longer to execute without it.
Jeff Verdegan wrote:I'm with Jesper on the "provide an SSCCE" part
Jesper de Jong wrote:You could try disassembling the bytecode with javap -c to see if there is any significant difference between the versions with and without the line.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:What's wrong with using the command line?
That doesn't explain (at least to me) why the second block (Bits.only) takes longer as well. The class is already loaded.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Hey! You're stepping on my hand! Help me tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|