| 注册
首页|期刊导航|河北工业科技|并行环境下Java哈希机制的对比及重构

并行环境下Java哈希机制的对比及重构

郑雅洁 张冬雯 张杨 郭松 梁亚楠 魏萌萌 于欣

河北工业科技2017,Vol.34Issue(6):414-420,7.
河北工业科技2017,Vol.34Issue(6):414-420,7.DOI:10.7535/hbgykj.2017yx06005

并行环境下Java哈希机制的对比及重构

Comparison and reconfiguration of Java hash mechanisms on parallel environment

郑雅洁 1张冬雯 1张杨 1郭松 1梁亚楠 1魏萌萌 1于欣1

作者信息

  • 1. 河北科技大学信息科学与工程学院,河北石家庄 050018
  • 折叠

摘要

Abstract

Aiming at the non-thread-safe under parallel environment,taking Hashtable and ConcurrentHashMap of Hash Mechanism as study obj ects,the test programs with variable numbers of threads and read-write threads are designed.The per-formance difference between ConcurrentHashMap and Hashtable is analyzed through the test program.According to the per-formance difference,the automatic refactoring of the program from Hashtable to ConcurrentHashMap is completed.Then in condition of the Hashtable encapsulation data, the performance difference between traditional multithreaded program processing and Java8 parallel stream handling approach is compared to analyze the effectiveness of parallel stream handling approach.The comparison result shows that the performance of ConcurrentHashMap in the parallel program is better than that of Hashtable.The research result provides new ways for solving non-thread-safe problems,which can be reference for parallel programming.

关键词

程序设计及其语言/线程安全/ConcurrentHashMap/哈希机制/重构/并行/流处理/Java8

Key words

program design and its language/thread safety/ConcurrentHashMap/Hash mechanism/refactoring/parallel/stream handling/Java8

分类

信息技术与安全科学

引用本文复制引用

郑雅洁,张冬雯,张杨,郭松,梁亚楠,魏萌萌,于欣..并行环境下Java哈希机制的对比及重构[J].河北工业科技,2017,34(6):414-420,7.

基金项目

国家自然科学基金(61440012) (61440012)

河北省研究生创新项目(XZZSS2017087) (XZZSS2017087)

河北工业科技

OACSTPCD

1008-1534

访问量0
|
下载量0
段落导航相关论文