The implementation of My Hash Table has the function of resizing the table when loading about 70%. My Hash table is implemented with a separate collision chain.
Does it make sense that I should resize the hash table at any time or just leave it as it is? Otherwise, if I increase the size (almost twice, in fact I follow this: http://planetmath.org/encyclopedia/GoodHashTablePrimes.html ) when the load is 70%, should I resize it when the load reaches 30% or lower?
- ? . , . , - , .
, - (. ). , .
? , - -, , , i ( ) i - n/2.
i
i - n/2
If the memory is cheap, leave it alone. If the memory is expensive, change it using hysteresis, as you suggested. When done, comment on the result to make sure that it works well and hasn’t done something stupid.
Source: https://habr.com/ru/post/1740836/More articles:When will the ASP.NET Website project be recompiled? - asp.netJava: ignoring screens when parsing XML - javaHow to create efficient code through unit testing? - unit-testingHow to save form data on the "Access Denied" page in Drupal? - drupalRead a hidden quote as a hidden quote from xml - javaPerforming grouping of results in code, not at the database level - .netPaste functionality for WPF DataGrid using DataGridTemplateColumns - c #How to set values to a custom DataGridBound column in WPF - c #Monitoring disk activity programmatically (Windows) - windowsKentico CMS Search Results - htmlAll Articles