Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9069
| From | Paul Cager <paul.cager@googlemail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Getter performance |
| Date | 2011-10-21 08:49 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <4a55f875-91cf-4fec-92ed-fd3d2534b095@y32g2000yqh.googlegroups.com> (permalink) |
| References | <4e99f537$0$623$426a74cc@news.free.fr> <4e9b3abe$0$31993$e4fe514c@dreader24.news.xs4all.nl> <qkYnq.8380$El.7557@newsfe19.iad> |
On Oct 20, 5:51 pm, David Lamb <dal...@cs.queensu.ca> wrote:
> Yes, and... thats why you need to do the loop thingy already mentioned:
> you have to amortize the JIT expense over many calls.
Yes, the benchmark doesn't let the code "warm up" before measuring.
It is also worth pointing out that within the loop being measured,
there is a call to rand() which is:
public static String rand() {
return new BigInteger(130, random).toString(32);
}
I expect what we are really measuring here is the performance of
SecureRandom and BigInteger - the previous comment about pennies and
bulldozers was good.
http://www.ibm.com/developerworks/java/library/j-jtp02225/index.html
is a really useful page when writing micro-benchmarks.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Getter performance Aéris <aeris@imirhil.fr> - 2011-10-15 23:03 +0200
Re: Getter performance Arne Vajhøj <arne@vajhoej.dk> - 2011-10-15 17:36 -0400
Re: Getter performance Arne Vajhøj <arne@vajhoej.dk> - 2011-10-15 17:42 -0400
Re: Getter performance BGB <cr88192@hotmail.com> - 2011-10-15 15:00 -0700
Re: Getter performance markspace <-@.> - 2011-10-15 15:20 -0700
Re: Getter performance David Lamb <dalamb@cs.queensu.ca> - 2011-10-20 12:45 -0400
Re: Getter performance Roedy Green <see_website@mindprod.com.invalid> - 2011-10-21 14:27 -0700
Re: Getter performance Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-21 18:57 -0700
Re: Getter performance Patricia Shanahan <pats@acm.org> - 2011-10-22 07:27 +0100
Re: Getter performance Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-10-22 09:57 -0300
Re: Getter performance Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-21 22:12 -0400
Re: Getter performance Aéris <aeris@imirhil.fr> - 2011-10-15 23:59 +0200
Re: Getter performance Arne Vajhøj <arne@vajhoej.dk> - 2011-10-15 19:44 -0400
Re: Getter performance Aéris <aeris@imirhil.fr> - 2011-10-16 13:14 +0200
Re: Getter performance Lars Enderin <lars.enderin@telia.com> - 2011-10-16 16:28 +0200
Re: Getter performance Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-16 09:47 -0400
Re: Getter performance Jaap Droogers <JaapDroogers@unusable.meel.homelinux.net> - 2011-10-16 22:12 +0200
Re: Getter performance BGB <cr88192@hotmail.com> - 2011-10-16 13:58 -0700
Re: Getter performance David Lamb <dalamb@cs.queensu.ca> - 2011-10-20 12:51 -0400
Re: Getter performance Paul Cager <paul.cager@googlemail.com> - 2011-10-21 08:49 -0700
Re: Getter performance Roedy Green <see_website@mindprod.com.invalid> - 2011-10-21 08:02 -0700
Re: Getter performance Wanja Gayk <brixomatic@yahoo.com> - 2011-10-22 21:11 +0200
csiph-web