M
markspace
non static => initialize 1 instance and lookup in HashMap for each ref
assignment
All of which is O(n), and which takes time and CPU cycles.
non static => initialize 1 instance and lookup in HashMap for each ref
assignment
Isn't that the argument we discussed last week and after Arveds test
could conclude was completely BS?
Just to chime in here, that other thread got so long and convoluted I
stopped reading it. Sorry if some of my posts here duplicated recently
discussed topics.
###Probably the blindingly obvious point that O(1) instantiation of theOn 3/9/2012 8:03 AM, Arne Vajhøj wrote:
All of which is O(n), and which takes time and CPU cycles.
Probably the blindingly obvious point that O(1) instantiation of the
logger is better than a per-object O(n) instantiation.
markspace said:Just to chime in here, that other thread got so long and convoluted I
stopped reading it. Sorry if some of my posts here duplicated recently
discussed topics.
By "application" do you mean JEE app or desktop app?
Either way, I don't understand your assertion. Why would static vs.
instance make any difference in a library, assuming no shared or other
special classloaders are in use?
Also be aware that while static loggers are common in Java in general,
instance loggers are recommended best practice according the the Apache
Commons website.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.