Re: StringBuffer/StringBuilder efficiency



On Sun, 27 Sep 2009 17:54:04 +0100, Tom Anderson
<twic@xxxxxxxxxxxxxxx> wrote, quoted or indirectly quoted someone who
said :


Almost always, i suspect. Certainly a common case that looks worth
optimising for.

In the ordinary case, the only methods of StringBuilder you use are
append and toString. Consider that server side code is mostly just
appending strings to put together the response. I think you might hit
20% improvement over what is typically done now with something that
avoids allocating RAM needlessly and copying needlessly. Multiply
that savings by all the Java servers out in the world, and you have
something worth doing.

Reducing CPU cycles has an additional payoff since these servers
typically use less AC power when not doing useful work. The cost of
power is becoming increasingly important in the overall economics of
servers.
--
Roedy Green Canadian Mind Products
http://mindprod.com

On two occasions I have been asked [by members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
~ Charles Babbage (born: 1791-12-26 died: 1871-10-18 at age: 79)
.



Relevant Pages

  • Fsck me sideways with a chainsaw
    ... we have about 60 servers that are not dual power input. ... two weeks, I've been migrating servers and switches, moving them to B-side ... The B-side UPS rectifier released its Magic Smoke all over the UPS ...
    (alt.sysadmin.recovery)
  • Re: ziz a dumb question?
    ... and increases power use ... Servers tend to be worse - I have a matched pair of Acer servers with ... All the numbers above are measurements before the PSU input (using the ... Core i3 series of processors, along with a new board, will use ...
    (freebsd-questions)
  • SUMMARY: Redundant power supplies arent
    ... Sun replaced both power supplies, stating that both had failed at the same ... servers had incomplete prtdiags along with differing power packages.. ... cluster patches. ... ahead and rebuilt it using the jumpstart and then applying the cluster ...
    (SunManagers)
  • Re: NMEA ref.clock better than my ISPs timeserver?
    ... out of back window with only short cable to servers. ... If you add air conditioning to the cupboard, a little noisy and power hungry? ... I would try and either go for a low-power PC, or cut down the power consumed by the PC and try to keep the load constant. ... good frequency reference and the gps with 10kHz out seem to be ...
    (comp.protocols.time.ntp)
  • Re: Comparing Mainframe and Windows Server CICS Transactions per kWh
    ... They assumed that somebody would actually run a distributed Intel based Windows box a 84+% busy the majority of the time. ... Most Windows server guys I talk to start looking at adding new servers once they get above any extended time period running at 30-40% busy. ... I don't know where the got the 5,221 watts from, because the paper they reference showing the z9 power consumption showed 3,916 watts for a 2094-704. ... They don't talk about what happens if you need to support a workload greater than the test environment could handle, or greater than the extrapolated z9 workload could handle. ...
    (bit.listserv.ibm-main)