Bruce Eckel on his book "Thinking in Java" states that a simple method call
(no parameters) takes 5.9 units of time while a synchronized method call
takes
570. OTOH, object creation takes 980 which makes it an even worse
alternative.

(The used time unit is the time spent to perform a local assignment.)

The book can be found on line (pdf format) from:
  http://www.bruceeckel.com/

You can find this data on a table in "Apendix D: Performance".


Have fun,
Paulo Gaspar

> -----Original Message-----
> From: Sam Ruby [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 27, 2001 13:17
>
> ...
>
> If it turns out that either of those two assertions are false (in
> particular if it turns out that the overhead of a synchronize is
> negligible
> compared to the overhead of the processing of a request), then we might as
> well do the simple and clean thing and remove the unsafe if checks.
>
> ...
>
> Anybody have any hard data on the validity of the presumptions above?
>
> - Sam Ruby


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to