Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.lang.java.programmer > #5826
| Date | 2011-07-02 16:50 -0700 |
|---|---|
| From | Patricia Shanahan <pats@acm.org> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: baseline performance test using java ... |
| References | <1309646728.550644@nntp.aceinnovative.com> |
| Message-ID | <jbKdnVadt8MsM5LTnZ2dnUVZ_tCdnZ2d@earthlink.com> (permalink) |
On 7/2/2011 3:45 PM, lbrt chx _ gemale kom wrote: > > I have searched to no avail for some kind of hardware baseline > performance test for a piece of code. > > Notice that I don't mean to "profile" code, with "baseline" I mean > that the actual performance of an algorithm should me gauged against > its underlying hardware and OS, like its I/O subsystem (RAM (types, > speed, amount), file access, ...) > > We have all learned we should avoid String(s) and use StringBuffer(s) > or better yet StringBuilder(s) but there is definitely more to > performance testing/gains Personally, I have not learned to avoid Strings. I use them where appropriate, for example when I have an immutable string. I use StringBuilder when I need to build a string through many steps. In general, benchmarking, like any experiment, only makes sense if you have some questions you want answered, and the measurements will answer those questions. I'm not at all clear what your questions are. "Performance of an algorithm" is a non-trivial concept. The most algorithm-specific measure of performance is computational complexity, but that is a matter of analysis, not measurement. Of course, one often needs to know how fast an algorithm will run for a specific problem size on a specific system. In that case, measurement is definitely the way to go. With modern computers, any sort of isolated measurement can be misleading. There is so much caching and prediction that code can behave very differently in different contexts. Patricia
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar
baseline performance test using java ... lbrt chx _ gemale kom - 2011-07-02 22:45 +0000 Re: baseline performance test using java ... markspace <-@.> - 2011-07-02 16:00 -0700 Re: baseline performance test using java ... Patricia Shanahan <pats@acm.org> - 2011-07-02 16:50 -0700
csiph-web