Thursday 9 April 2015

What is LoadFactor and Importance of Load factor in java

As per java we should maintain it as .75 and initial capacity is 16.however we can increase it.
but this is the best because let we give it to Initial=100 and load factor=1
now total size to fill is 100*1=100;
two problem
1-it will take time to create 100 bucket size
2-there may be chance of waist of memory
now 16*.75=12
so advantage
1-it will take less time to crate 12
2-if at all chance of waist of memory then it would be less
again we need to increase the bucket size ,since it is create less bucket so we can bear it.not big size

more link:-
http://www.coderanch.com/t/261961/java-programmer-SCJP/certification/Default-load-factor

No comments:

Post a Comment