Originally posted by Rufus Bugleweed:
A Singleton can allow access to many instances, a pooling scheme.
>Come on, the bottleneck is going to be database access, network calls, monolithic servlets, fine-grained entity beans, or some other far reaching problem. If you are creating a large-scale J2EE application then Singletons are going to be your last worry as far as performance goes.
Originally posted by shyh:
I did a simple test investigating the performance of calling static/nonstatic, public/private methods with a loop of 1,000,000 times, and the results are the same.
So, I don't get your points.
Do you mean by "calling multiple times of a nonstatic method of one single instance", or "calling the nonstatic method of multiple new instances"?
Originally posted by Simon Lee:
Originally posted by sh yh:
So, I guess the performance for static and non-static methods depends on how the JVM is implemented. However, it does not matter whether the method is "public" or "private".
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Thread Boost featurehttps://coderanch.com/t/674455/Thread-Boost-feature