Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10042
| From | markspace <-@.> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: alias for Integer |
| Date | 2011-11-18 07:11 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <ja5sjp$d8p$1@dont-email.me> (permalink) |
| References | <21374513.220.1321627842805.JavaMail.geo-discussion-forums@yqmj32> |
On 11/18/2011 6:50 AM, jrobinss wrote: > > 3. is there any > performance issue in defining my own classes instead of Integer? To me yes, there is a performance issue, and you should definitely consider using something besides Integer and Map for this. > Note that (exceptionnally for me) performance *is* an issue here. I > haven't yet narrowed it down, but the code executes very slowly and > eats up much too much memory at the moment. I'm starting to optimize > it, that's why I'm starting with strongly typing it to prevent > errors. Good, you're doing this the right way. You should look into profiling your code. NetBeans has an excellent profiler built in, and will handle most "user made" projects as well as its own format. You should look into it. The most important thing is to pinpoint where the code is slow and work on those bits. I suspect that auto-boxing and unboxing is costing you too much time, but I couldn't prove it. The profiler could.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
alias for Integer jrobinss <julien.robinson2@gmail.com> - 2011-11-18 06:50 -0800
Re: alias for Integer markspace <-@.> - 2011-11-18 07:11 -0800
Re: alias for Integer Roedy Green <see_website@mindprod.com.invalid> - 2011-11-18 07:32 -0800
Re: alias for Integer Lew <lewbloch@gmail.com> - 2011-11-18 07:34 -0800
Re: alias for Integer jrobinss <julien.robinson2@gmail.com> - 2011-11-18 08:26 -0800
Re: alias for Integer Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-18 18:00 +0000
Re: alias for Integer markspace <-@.> - 2011-11-18 10:17 -0800
Re: alias for Integer Roedy Green <see_website@mindprod.com.invalid> - 2011-11-18 20:30 -0800
Re: alias for Integer Roedy Green <see_website@mindprod.com.invalid> - 2011-11-18 20:23 -0800
Re: alias for Integer Jim Janney <jjanney@shell.xmission.com> - 2011-11-18 13:14 -0700
Re: alias for Integer Patricia Shanahan <pats@acm.org> - 2011-11-18 12:43 -0800
Re: alias for Integer jrobinss <julien.robinson2@gmail.com> - 2011-11-21 01:50 -0800
Re: alias for Integer Robert Klemme <shortcutter@googlemail.com> - 2011-11-21 20:58 +0100
Re: alias for Integer David Lamb <dalamb@cs.queensu.ca> - 2011-11-21 15:38 -0500
csiph-web