摘要
分析了Java哈希表的实现特点并给出了导致其性能恶化的一种数据模式。针对这种数据模式的特点,提出了基于素数序列的哈希表优化方法,从而几乎完全避免了该模式下哈希表的性能恶化。实验与理论结果表明:对提出的模式数据,优化方法产生的Hash碰撞比JDK中的方法下降接近100%,而且对随机数据下的Java哈希表性能也有改善。
The method of implementing Java Hashtable is analyzed and a model of data that can seriously worsen the performance of the Hashtable is given.A method based on prime number sequence is presented to nearly completely avoid this performance deterioration under such model.Both experiments and theory proof show that the new method not only reduces the number of hash conflicts by nearly 100% than the old one in JDK for presented data model but also can improve performance of Java Hashtable for ordinary data.
出处
《计算机工程与应用》
CSCD
北大核心
2008年第3期108-109,142,共3页
Computer Engineering and Applications