HugeCalc 算法库测试报告

返回索引

    一个算法库的性能体现应是多方面的,下面仅以阶乘为例测试大数乘法的效率(这是大数算法中的最核心部分)。

n!digitsA2-1A2-0A1-1A1-0A0-0BC
10,000!35,6600.004586 s0.004682 s0.006145 s0.006254 s0.007348 s2.168x10^-19 s0.095 s
100,000!456,5740.074358 s0.081094 s0.110150 s0.121145 s0.333286 s0.047 s0.188 s
200,000!973,3510.159463 s0.179471 s0.251844 s0.280748 s1.026817 s0.156 s0.234 s
400,000!2,067,1100.372189 s0.408471 s0.580490 s0.649423 s3.142477 s0.36 s0.578 s
800,000!4,375,0400.857702 s0.934181 s1.348855 s1.526333 s9.304887 s0.875 s1.391 s
1,000,000!5,565,7091.087945 s1.208318 s1.781194 s2.023373 s13.692116 s1.265 s0.891 s
10,000,000!65,657,06014.922132 s17.024912 s24.660277 s28.985707 s-----------20.141 s57.687 s
20,000,000!137,334,71530.775132 s35.551279 s51.123602 s61.061514 s-----------46.484 s--------
40,000,000!286,710,62567.570732 s78.600010 s112.555688 s136.195050 s-----------108.891 s--------

CPU: AMD Athlon 64 X2 Dual Core Processor 4800+, 2.512GHz(201MHz x12.5), L1 Cache 64KB, L2 Cache 512KB (参见:CPU-Z 1.42 报告)
OS : Windows XP SP2
RAM: 2GB DDR2 - 800MHz
Date: 2007-11-30



  A -- HugeCalc V8.0.0.0
     A2-1 --> HugeCalc.ini: NumOfCores = 2; SSE2Support = 1; (测试双核、SSE2指令加速)
     A2-0 --> HugeCalc.ini: NumOfCores = 2; SSE2Support = 0; (测试双核、ALU 指令加速)
     A1-1 --> HugeCalc.ini: NumOfCores = 1; SSE2Support = 1; (测试单核、SSE2指令加速)
     A1-0 --> HugeCalc.ini: NumOfCores = 1; SSE2Support = 0; (测试单核、ALU 指令加速)
     A0-0 --> HugeCalc.ini: NumOfCores = 0; SSE2Support = 0; (测试无高级算法参与)
  B -- Mathematica V6.0.1.0
  C -- Maple V11.0 ( February 17 2007, Build ID 277223 )

欢迎大家在自己本地机上进行对比测试,并将结果与大家分享!

备注:

  1. Mathematica、Maple 为当今世界上最优秀的几个数学软件之一,在高精度的数值计算等领域享有盛誉;
  2. HugeCalc 则是一款自主开发的国产软件,其核心算法已不逊于它们,甚至有所胜出!
  3. 参与本次测试之版本均为当前的最新版;
  4. 以上测试均在同样的软硬件环境下(参见:CPU-Z 1.42 报告);
  5. 以上测试均不含输出时间;
  6. 如果需要输出,后两者将远落后于 HugeCalc!
  7. 测试程序/源代码:
    A -- Factorial.exe (以 HugeCalc 为内核)
    B -- Factorial.nb (Mathematica Notebook)
    C -- Factorial.mw (Maple Worksheet File)
  8. 其中 HugeCalc.ini 由 RegDLL.exe 自动生成,用户可自由修改后测试(见 HugeCalc 完全版中的帮助 HugeCalc.chm)
  9. 结论:横向对比,在该系统上,精确计算 40,000,000!,HugeCalc 比最新的 Mathematica V6.01 快了 61%

  10.    纵向对比:在该系统上,精确计算 40,000,000!,用 SSE2 指令集时,HugeCalc V8.0.0.0 同比 HugeCalc V7.0.1.0 快了 1.67%;不用 SSE2 指令集时,则同比快了 36.35%.

下载瞧瞧