HugeCalc 算法库测试报告
返回索引
一个算法库的性能体现应是多方面的,下面仅以阶乘为例测试大数乘法的效率(这是大数算法中的最核心部分)。
n! | digits | A2-1 | A2-0 | A1-1 | A1-0 | A0-0 | B | C |
10,000! | 35,660 | 0.004586 s | 0.004682 s | 0.006145 s | 0.006254 s | 0.007348 s | 2.168x10^-19 s | 0.095 s |
100,000! | 456,574 | 0.074358 s | 0.081094 s | 0.110150 s | 0.121145 s | 0.333286 s | 0.047 s | 0.188 s |
200,000! | 973,351 | 0.159463 s | 0.179471 s | 0.251844 s | 0.280748 s | 1.026817 s | 0.156 s | 0.234 s |
400,000! | 2,067,110 | 0.372189 s | 0.408471 s | 0.580490 s | 0.649423 s | 3.142477 s | 0.36 s | 0.578 s |
800,000! | 4,375,040 | 0.857702 s | 0.934181 s | 1.348855 s | 1.526333 s | 9.304887 s | 0.875 s | 1.391 s |
1,000,000! | 5,565,709 | 1.087945 s | 1.208318 s | 1.781194 s | 2.023373 s | 13.692116 s | 1.265 s | 0.891 s |
10,000,000! | 65,657,060 | 14.922132 s | 17.024912 s | 24.660277 s | 28.985707 s | ----------- | 20.141 s | 57.687 s |
20,000,000! | 137,334,715 | 30.775132 s | 35.551279 s | 51.123602 s | 61.061514 s | ----------- | 46.484 s | -------- |
40,000,000! | 286,710,625 | 67.570732 s | 78.600010 s | 112.555688 s | 136.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 )
备注:
- Mathematica、Maple 为当今世界上最优秀的几个数学软件之一,在高精度的数值计算等领域享有盛誉;
- HugeCalc 则是一款自主开发的国产软件,其核心算法已不逊于它们,甚至有所胜出!
- 参与本次测试之版本均为当前的最新版;
- 以上测试均在同样的软硬件环境下(参见:CPU-Z 1.42 报告);
- 以上测试均不含输出时间;
- 如果需要输出,后两者将远落后于 HugeCalc!
- 测试程序/源代码:
A -- Factorial.exe (以 HugeCalc 为内核)
B -- Factorial.nb (Mathematica Notebook)
C -- Factorial.mw (Maple Worksheet File)
- 其中 HugeCalc.ini 由 RegDLL.exe 自动生成,用户可自由修改后测试(见 HugeCalc 完全版中的帮助 HugeCalc.chm)
- 结论:横向对比,在该系统上,精确计算 40,000,000!,HugeCalc 比最新的 Mathematica V6.01 快了 61%!
纵向对比:在该系统上,精确计算 40,000,000!,用 SSE2 指令集时,HugeCalc V8.0.0.0 同比 HugeCalc V7.0.1.0 快了 1.67%;不用 SSE2 指令集时,则同比快了 36.35%.
下载瞧瞧