Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36260
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2017-02-14 07:47 -0800 |
| References | <speed-20170214014104@ram.dialup.fu-berlin.de> <o7tmmt$mch$1@gioia.aioe.org> |
| Message-ID | <2f66a1eb-a034-4a5a-8d4e-6315e3f3f1e7@googlegroups.com> (permalink) |
| Subject | Re: execution speed when printing |
| From | Eric Douglas <e.d.programmer@gmail.com> |
On Monday, February 13, 2017 at 8:32:23 PM UTC-5, Arne Vajhøj wrote: > On 2/13/2017 7:48 PM, Stefan Ram wrote: > > I believe that (assuming »d« has type »double«) > > > > java.lang.System.out.print( d ); > > java.lang.System.out.println( " miles" ); > > > > might be faster than > > > > java.lang.System.out.println( d +" miles" ); > > I think it would be a disaster to get beginners focused on > that sort of premature optimization. > > Regarding the issue itself then it is not obvious to me that the > concatenation is more expensive than the extra calls. > > Arne On a question so trivial, go with the Microsoft solution. Software running slow? Get better hardware.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: execution speed when printing Arne Vajhøj <arne@vajhoej.dk> - 2017-02-13 20:32 -0500 Re: execution speed when printing Eric Douglas <e.d.programmer@gmail.com> - 2017-02-14 07:47 -0800
csiph-web