Skip to content

Latest commit

 

History

History
51 lines (49 loc) · 3.87 KB

Test_BenchMark_MacOS_M1Pro.md

File metadata and controls

51 lines (49 loc) · 3.87 KB

GFloat Test And BenchMark

  • Test time : Tue Oct 11 14:49:21 2022
Operation System C++ Compiler version CPU Base Frequency
Mac OSX Apple LLVM 13.1.6 (clang-1316.0.21.2.5) Apple Arm CPU 0.024 GHz or 0.024 GHz
  • Performance: float vs GFloat, Call 1000000 times
  • Error : the relative error between cmath (double) and GFloat Math
Function avg error max error max abs error float vs GFloat float / GFloat
Add 0.000004 % 0.000024 % 0.003906 0.34 vs 5.78 (ms) 0.06
Sub 0.000004 % 0.000024 % 0.003906 0.34 vs 5.95 (ms) 0.06
Mul 0.000012 % 0.000048 % 32.000000 0.34 vs 0.92 (ms) 0.37
Div 0.000009 % 0.000024 % 0.031250 0.38 vs 1.69 (ms) 0.23
Ceil 0.000000 % 0.000000 % 0.000000 0.18 vs 1.63 (ms) 0.11
Floor 0.000000 % 0.000000 % 0.000000 0.18 vs 0.77 (ms) 0.24
Whole 0.000000 % 0.000000 % 0.000000 0.20 vs 1.42 (ms) 0.14
WholeFrac 0.000000 % 0.000000 % 0.000000 0.17 vs 5.71 (ms) 0.03
Fraction 0.000000 % 0.000000 % 0.000000 0.18 vs 3.30 (ms) 0.06
-() 0.000000 % 0.000000 % 0.000000 0.20 vs 0.52 (ms) 0.38
>() 0.000000 % 0.000000 % 0.000000 0.38 vs 7.76 (ms) 0.05
<() 0.000000 % 0.000000 % 0.000000 0.32 vs 7.98 (ms) 0.04
>=() 0.000000 % 0.000000 % 0.000000 0.33 vs 7.82 (ms) 0.04
<=() 0.000000 % 0.000000 % 0.000000 0.34 vs 1.73 (ms) 0.20
Abs 0.000000 % 0.000000 % 0.000000 0.18 vs 0.53 (ms) 0.34
Normalize32 0.000000 % 0.000000 % 0.000000 0.17 vs 1.05 (ms) 0.16
Normalize64 0.000000 % 0.000000 % 0.000000 0.17 vs 1.07 (ms) 0.16
FromInt 0.000000 % 0.000000 % 0.000000 0.19 vs 0.97 (ms) 0.20
Fromfloat 0.000000 % 0.000000 % 0.000000 0.17 vs 0.17 (ms) 1.00
CeilToInt 0.000000 % 0.000000 % 0.000000 0.18 vs 2.34 (ms) 0.08
FloorToInt 0.000000 % 0.000000 % 0.000000 0.18 vs 1.97 (ms) 0.09
Sin 0.000099 % 4.559921 % 0.000005 3.72 vs 5.17 (ms) 0.72
Cos 0.001806 % 0.122642 % 0.000028 3.78 vs 5.50 (ms) 0.69
Tan 0.001776 % 4.562861 % 83.726562 8.10 vs 13.61 (ms) 0.59
ASin 0.031373 % 100.000000 % 0.049958 2.78 vs 7.63 (ms) 0.36
ACos 0.117627 % 98.413861 % 0.049958 3.41 vs 10.90 (ms) 0.31
ATan 0.003567 % 0.036536 % 0.000166 2.58 vs 10.99 (ms) 0.23
ATan(10,x) 0.006190 % 0.021383 % 0.000166 4.79 vs 15.22 (ms) 0.31
ATan(x,10) 0.007318 % 0.230349 % 0.000166 4.54 vs 13.93 (ms) 0.33
Sqrt 0.000038 % 0.000084 % 0.000076 0.67 vs 5.44 (ms) 0.12
InvSqrt 0.000026 % 0.000062 % 0.000183 0.95 vs 4.35 (ms) 0.22
Exp 0.001698 % 0.050661 % 19760.000000 5.57 vs 6.61 (ms) 0.84
Pow2 0.001820 % 0.050354 % 72448.000000 2.00 vs 5.41 (ms) 0.37
Log_e 0.001206 % 86.225453 % 0.000031 1.91 vs 3.55 (ms) 0.54
Log_2 0.001206 % 86.225884 % 0.000043 1.96 vs 3.13 (ms) 0.63
Log_10 0.001206 % 86.224927 % 0.000013 1.97 vs 3.54 (ms) 0.56
Pow(1.7,x) 0.003043 % 0.049457 % 2121.500000 4.39 vs 13.81 (ms) 0.32
Pow(x,1.7) 0.006763 % 0.055199 % 0.015121 4.50 vs 14.98 (ms) 0.30
Fmod(x,1.7) 0.129491 % 7214.285714 % 1.700575 15.22 vs 12.09 (ms) 1.26
Fmod(1.7,x) 0.000327 % 15.789474 % 0.000000 4.46 vs 6.04 (ms) 0.74