Optimizing Program Performance--Expressing relative performance

来源:互联网 发布:apache与php的关系 编辑:程序博客网 时间:2024/05/31 11:03

The best way to express a performance improvement is as a ratio of the form Told/Tnew, where Told is the time
required for the original version and Tnew is the time required by the modified version.

 

This will be a number greater
than 1.0 if any real improvement occurred. We use the suffix ‘X’ to indicate such a ratio, where the factor “3.5X” is
expressed verbally as “3.5 times.”

 

用时间的比值作为衡量性能的参照。

 

 

The more traditional way of expressing relative change as a percentage works well when the change is small, but its
definition is ambiguous. Should it be 100 * (Told -Tnew )/Tnew or possibly 100 * (Told -Tnew )/Told , or something
else? In addition, it is less instructive for large changes. Saying that “performance improved by 250%” is more
difficult to comprehend than simply saying that the performance improved by a factor of 3.5.

 

这个表达方式 并不确定