473,385 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Load factor

Is there any reason why my hashtable load factor doesn't accept the
value i assign to? it always resets it self to the default which is
0.72f although i initialized the table using:

HashTable HT = new HasTable(100,1.0f)

Thank you,

Maya.

Jul 26 '06 #1
2 2371
And how might you be determining that your Hashtable has a different load
factor
than the one passed in your constructor? Could you please post a short but
complete code example?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Maya" wrote:
Is there any reason why my hashtable load factor doesn't accept the
value i assign to? it always resets it self to the default which is
0.72f although i initialized the table using:

HashTable HT = new HasTable(100,1.0f)

Thank you,

Maya.

Jul 26 '06 #2
Maya,

That's by design. The value specified in the constructor is actually
reduced by 72 percent. Microsoft felt that a load factor of 0.72 was
optimal and anything higher would degrade performance so they
automatically scale the value you provide. See the following article
for more information.

<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/datastructures_guide2.asp>

Brian

Maya wrote:
Is there any reason why my hashtable load factor doesn't accept the
value i assign to? it always resets it self to the default which is
0.72f although i initialized the table using:

HashTable HT = new HasTable(100,1.0f)

Thank you,

Maya.
Jul 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jaime Stuardo | last post by:
Hi all... I have a table that will never change. Specifically it's a mortality chart that I need to use to make some calculations. One column of the table is the age of the person, and other...
4
by: Vincento Harris | last post by:
Hi There are a lot of articles about the fillfactor. I did change the fill factor and that did not work as intended. How do I get back to the default fill factor I am using sp_msforeachtable...
4
by: Gary Davis | last post by:
Once a day or so, I receive an error on a fairly active website that calls this StrMixed.cs method constructor. 99% of the time there is no exception: System.Web.HttpUnhandledException:...
17
by: John A Grandy | last post by:
For a Hashtable that is expected to contain no more than 100 DictionaryEntry elements , what is the best load factor ? ( This Hashtable is a encapsulted in a class , an instance of which is...
0
by: harisankar22 | last post by:
Hi All, I am trying to configure a load balancer environment with mod_jk and tomcat workers. I have 2 applications app1 deployed on a set of servers, and app2 deployed on another set of servers....
1
by: Dennis | last post by:
I've noticed some old posts regarding this issue; but nothing recently and no resolutions in the old postings. Its almost hard for me to believe that this wouldn't be fixed by now. I am using...
14
by: Nathan Pinno | last post by:
How do I factor a number? I mean how do I translate x! into proper Python code, so that it will always do the correct math? Thanks in advance, Nathan P.
1
by: Med | last post by:
Hi, Initial load of my ASP.NET app takes 50 seconds to load. Then it become fairly fast. Followings are my app/hardware configs: Server/IIS: ----------- IIS 6 running on Hosted VPS...
4
hemantbasva
by: hemantbasva | last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.