首页 | 官方网站   微博 | 高级检索  
     

多线程的效率
引用本文:郭辉.多线程的效率[J].计算机应用,2008,28(Z2).
作者姓名:郭辉
作者单位:常熟理工学院计算机科学与工程学院,江苏,常熟,215500
摘    要:用Java语言定义了一个线程类,并用System类中的静态方法eurrentTimeMillis()计算时间,从而比较了用不同个数的线程求数组元素和的时间.通过实验证明在LimLx、Windows 2000 Advanced Server和Windows XPProfessional系统中,在加数个数一定的条件下,并不是线程数越多,效率越高.而是要用合适的线程数.同时通过分析了在Windows XP Professional中,不同配置的计算机线程个教与加数的关系相似.

关 键 词:Java语言  线程  效率  数组

Efficiency of multithread
GUO Hui.Efficiency of multithread[J].journal of Computer Applications,2008,28(Z2).
Authors:GUO Hui
Affiliation:GUO Hui(School of Computer Sciences , Engeering,Changshu Inistute Technology,Changshu Jiangsu 215500,China)
Abstract:A thread class was defined in the Java language,and the times of determining the summation of elements in an array in different number of threads were compared.The calculation cost was obtained with the static method currentTimeMillis() in the system class.Given the definite number of addend,based on the most popular operating systems such as Linux,Windows 2000 Advanced Server,Windows XP Professional,the experiments show that not the more the number of the threads is,the better the efficiency is.In the mean...
Keywords:Java  thread  efficiency  array  
本文献已被 CNKI 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号