Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36910
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: A third easy performance optimisation needed |
| Date | 2017-07-13 14:32 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ok8ebc$10jb$1@gioia.aioe.org> (permalink) |
| References | <87d1946ab3.fsf@munus.decebal.nl> <ok7oar$1uaf$2@gioia.aioe.org> <cf0341d5-fc31-4aca-822e-d51c5d74587f@googlegroups.com> <87pod44foe.fsf@munus.decebal.nl> <ok8dcg$jie$1@dont-email.me> |
On 7/13/2017 2:19 PM, Joshua Cranmer 🐧 wrote: > Before you do anything else, please start by using a proper Java > microbenchmarking harness (hint: if you're writing it yourself, it's not > a proper harness). > > Rather, if you're trying to give a presentation on performance > optimizations, here's the rules you should be presenting instead: > > 1. Ignore all advice on performance optimization that says "use X > instead of Y" or "avoid X." That's not to say it's all wrong, but much > of it is based on incorrect preconceptions or poorly-conducted studies. > At best, this sort of advice should generally be thought of as places to > start looking for performance improvements when you've identified problems. > > 2. Learn how to measure performance properly (indeed, on any of this > kind of presentation, this should be the brunt of the presentation). In > particular, performance needs to be measured holistically, testing as > much of the system as possible. And evaluating performance improvements > needs to also avoid the pitfall of "we tuned the GC to not run on our > benchmark, fixing all performance issues!" > > 2a. In particular, say no to microbenchmarks. They have their uses. But > their applicability is often minimal, far less than many people look for > in a benchmark. If you don't have the resources to be able to explain > why the optimizer is preferring differences (e.g., you're not reading > the assembly), then you likely don't have the ability to understand the > applicability, much less communicate the results properly. > > 3. Performance optimization is a step that only happens once you've > measured and identified the bottlenecks. If you don't have the results > saying "this part right here is the problem," you're not ready yet. Goetz has also written about microbenchmarks: https://www.ibm.com/developerworks/java/library/j-jtp02225/ Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A third easy performance optimisation needed Cecil Westerhof <Cecil@decebal.nl> - 2017-07-13 09:54 +0200
Re:A third easy performance optimisation needed omegajunior <omegajunior@protonmail.com> - 2017-07-13 06:29 -0400
Re: A third easy performance optimisation needed Martin Gregorie <martin@address-in-sig.invalid> - 2017-07-13 11:27 +0000
Re: A third easy performance optimisation needed Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-07-13 07:41 -0400
Re: A third easy performance optimisation needed Eric Douglas <e.d.programmer@gmail.com> - 2017-07-13 05:48 -0700
Re: A third easy performance optimisation needed Arne Vajhøj <arne@vajhoej.dk> - 2017-07-13 19:39 -0400
Re: A third easy performance optimisation needed Cecil Westerhof <Cecil@decebal.nl> - 2017-07-13 15:14 +0200
Re: A third easy performance optimisation needed Eric Douglas <e.d.programmer@gmail.com> - 2017-07-13 07:07 -0700
Re: A third easy performance optimisation needed Robert Klemme <shortcutter@googlemail.com> - 2017-07-13 19:58 +0200
Re: A third easy performance optimisation needed Cecil Westerhof <Cecil@decebal.nl> - 2017-07-13 20:02 +0200
Re: A third easy performance optimisation needed Arne Vajhøj <arne@vajhoej.dk> - 2017-07-13 08:16 -0400
Re: A third easy performance optimisation needed Eric Douglas <e.d.programmer@gmail.com> - 2017-07-13 06:08 -0700
Re: A third easy performance optimisation needed Cecil Westerhof <Cecil@decebal.nl> - 2017-07-13 15:41 +0200
Re: A third easy performance optimisation needed Eric Douglas <e.d.programmer@gmail.com> - 2017-07-13 07:09 -0700
Re: A third easy performance optimisation needed Eric Douglas <e.d.programmer@gmail.com> - 2017-07-13 08:07 -0700
Re: A third easy performance optimisation needed Cecil Westerhof <Cecil@decebal.nl> - 2017-07-13 18:37 +0200
Re: A third easy performance optimisation needed Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2017-07-13 13:19 -0500
Re: A third easy performance optimisation needed Arne Vajhøj <arne@vajhoej.dk> - 2017-07-13 14:32 -0400
Re: A third easy performance optimisation needed Arne Vajhøj <arne@vajhoej.dk> - 2017-07-13 13:52 -0400
Re: A third easy performance optimisation needed Eric Douglas <e.d.programmer@gmail.com> - 2017-07-14 07:52 -0700
A third easy performance optimisation needed lewbloch@gmail.com - 2017-07-14 14:47 -0700
csiph-web