commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Strange performance issues seen with Log.isDebugEnabled()
Date Thu, 26 Jun 2008 13:09:36 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jean-Philippe,

Jean-Philippe Daigle wrote:
| Yes, it *should* be equivalent, but I've also tried defining a Dummy
| class, getting a static instance of it, and calling a dummy method (that
| won't get optimized away) and it's fast (~80000 WU/s). Going back to my
| custom isDebugEnabled(), boom, down to ~30000 WU/s. Unless you tell me
| that calling a method on an interface is HUGELY more expensive than a
| direct call (I don't think it is, and it wouldn't explain my
| micro-timings anyways), I have no idea what's going on.

Interface calls are a /bit/ longer than regular ones, but I wouldn't
have expected them to be twice as long. What JDK, OS, etc. are you using?

Remember that on many OSs, currentTimeNanos can lie to you and not give
you as fine-grained resolution as it should.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhjlRAACgkQ9CaO5/Lv0PCdCACeJt8ypRrH/fuhPFjENYq1S8KF
wPQAniwoo1PD7ygkGJz3Ab61gKCYkNXn
=4NlD
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message