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

程序执行的时空测量方法研究
引用本文:黎远松.程序执行的时空测量方法研究[J].四川轻化工学院学报,2014(1):53-55.
作者姓名:黎远松
作者单位:四川理工学院计算机学院,四川自贡643000
基金项目:四川省教育厅科研项目(13ZA0125);软件工程专业综合改革项目(ZG-1202)
摘    要:程序执行时所花费的时间和内存空间是评价一个程序性能优劣的一个重要指标.理论上,可以借助于数学这个强有力的工具估算出程序的时间复杂度和空间复杂度,然后用这两个标准来度量程序的效率;实际上,在源代码在线评测系统这样的实际系统中无法使用.文章对程序执行时所花费的时间和内存空间的测量方法进行大量深入的研究,基于DOS平台,提出了计时法,利用clock和coreleft测量程序执行的时间和空间;基于Windows平台,利用Get Process Times和Get Process MemoryInfo测量程序执行的时间和空间,在四川理工ACM中得到应用,实践证明这些方法正确、有效.

关 键 词:程序  时间  空间  测量  方法

Research on Approaches to Measure Program Execution Time and Space
LI Yuansong.Research on Approaches to Measure Program Execution Time and Space[J].Journal of Sichuan Institute of Light Industry and Chemical Technology,2014(1):53-55.
Authors:LI Yuansong
Affiliation:LI Yuansong (School of Computer Science, Sichuan University of Science & Engineering, Zigong 643000, China)
Abstract:Time and space needed for process are two essential measures of our algorithm. In theory, we calculate the time complexity and space complexity of the algorithm with the aid of mathematics firstly, and then measure the efficiency of the algorithm with these two standards. In fact, the time complexity and space complexity of the algorithm cannot be used in the actual system such as online judge system. Approaches to measure process execution time and space were deeply researched for this problem and timing based on DOS was proposed, which measures program execution timing and memory with clock and coreleft. Base on windows with get process times and get process memory Info, it had been applied in the SUSE ACM correctly and effectively.
Keywords:program  time  measure  approach
本文献已被 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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

京公网安备 11010802026262号