pif_LongInt

by Popisfizzy
Double, triple, and quadruple-precision integers, both signed and unsigned.
ID:2079022
 
This thread is for documenting the results of stress tests on the classes of the pif_LongInt library.
Results of a test battery on the UnsignedDouble class.

Summary
  1. Add(): 77,041 operations/second
  2. Subtract(): 73,313 operations/second
  3. Multiply(): 53,022 operations/second
  4. Quotient(): 47,709 operations/second
  5. Remainder(): 35,137 operations/second
  6. Divide(): 28,011 operations/second
  7. Square(): 87,565 operations/second
  8. Power(): 12,661 operations/second
  9. BitwiseAnd(): 132,978 operations/second
  10. BitwiseOr(): 138,504 operations/second
  11. BitwiseXor(): 132,275 operations/second
  12. BitwiseNot(): 1,111,111 operations/second
  13. BitshiftLeft(): 328,947 operations/second
  14. BitshiftLeftRotate(): 335,570 operations/second
  15. BitshiftRight(): 359,712 operations/second
  16. BitshiftRightRotate(): 277,777 operations/second

Full Data
                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/AddTest                                0.155        1.204        1.204            1
/pif_LongInt/UnsignedDouble/Add                  0.293        0.640        0.649        50000
/pif_LongInt/UnsignedDouble/proc/_Process        0.431        0.533        0.516       150000
/pif_LongInt/UnsignedDouble/Set                  0.143        0.414        0.404       100000
/pif_LongInt/UnsignedDouble/_SetBlock            0.085        0.088        0.116       100000
/pif_LongInt/UnsignedDouble/_GetBlock            0.085        0.086        0.089       100000
/pif_LongInt/UnsignedDouble/Length               0.012        0.013        0.013        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            2

Add(): 77,041 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/SubtractTest                           0.160        1.243        1.243            1
/pif_LongInt/UnsignedDouble/Subtract             0.326        0.689        0.682        50000
/pif_LongInt/UnsignedDouble/proc/_Process        0.405        0.506        0.525       150000
/pif_LongInt/UnsignedDouble/Set                  0.170        0.398        0.416       100000
/pif_LongInt/UnsignedDouble/_GetBlock            0.088        0.090        0.099       100000
/pif_LongInt/UnsignedDouble/_SetBlock            0.089        0.091        0.087       100000
/pif_LongInt/UnsignedDouble/Length               0.005        0.006        0.010        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            2

Subtract(): 73,313 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/MultiplyTest                           0.159        1.525        1.526            1
/pif_LongInt/UnsignedDouble/Multiply             0.596        0.958        0.943        50000
/pif_LongInt/UnsignedDouble/proc/_Process        0.406        0.507        0.520       150000
/pif_LongInt/UnsignedDouble/Set                  0.176        0.413        0.432       100000
/pif_LongInt/UnsignedDouble/_SetBlock            0.089        0.090        0.093       100000
/pif_LongInt/UnsignedDouble/_GetBlock            0.094        0.096        0.086       100000
/pif_LongInt/UnsignedDouble/Length               0.005        0.005        0.013        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            2

Multiply(): 53,022 operations/second

                                  Profile results (total time)
Proc Name                                        Self CPU    Total CPU    Real Time        Calls
--------------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/QuotientTest                              0.155        1.636        1.636            1
/pif_LongInt/UnsignedDouble/Quotient                0.198        1.056        1.048        50000
/pif_LongInt/UnsignedDouble/proc/_AlgorithmD        0.577        0.580        0.572        50000
/pif_LongInt/UnsignedDouble/proc/_Process           0.419        0.497        0.500       150000
/pif_LongInt/UnsignedDouble/Set                     0.164        0.431        0.440       100000
/pif_LongInt/UnsignedDouble/_GetBlock               0.063        0.066        0.084       100000
/pif_LongInt/UnsignedDouble/_SetBlock               0.052        0.053        0.062        50000
/pif_LongInt/UnsignedDouble/Length                  0.008        0.009        0.012        50000
/pif_LongInt/UnsignedDouble/New                     0.000        0.000        0.000            2

Quotient(): 47,709 operations/second

                                  Profile results (total time)
Proc Name                                        Self CPU    Total CPU    Real Time        Calls
--------------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/RemainderTest                             0.164        1.948        1.948            1
/pif_LongInt/UnsignedDouble/Remainder               0.448        1.411        1.423        50000
/pif_LongInt/UnsignedDouble/proc/_AlgorithmD        0.610        0.610        0.612        50000
/pif_LongInt/UnsignedDouble/proc/_Process           0.396        0.489        0.501       150000
/pif_LongInt/UnsignedDouble/Set                     0.143        0.376        0.380       100000
/pif_LongInt/UnsignedDouble/_SetBlock               0.096        0.098        0.112       100000
/pif_LongInt/UnsignedDouble/_GetBlock               0.081        0.086        0.092       100000
/pif_LongInt/UnsignedDouble/Length                  0.010        0.010        0.016        50000
/pif_LongInt/UnsignedDouble/New                     0.000        0.000        0.000            2

Remainder(): 35,137 operations/second

                                  Profile results (total time)
Proc Name                                        Self CPU    Total CPU    Real Time        Calls
--------------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/DivideTest                                0.202        2.381        2.381            1
/pif_LongInt/UnsignedDouble/Divide                  0.666        1.784        1.785        50000
/pif_LongInt/UnsignedDouble/proc/_AlgorithmD        0.560        0.561        0.568        50000
/pif_LongInt/UnsignedDouble/proc/_Process           0.430        0.523        0.558       150000
/pif_LongInt/UnsignedDouble/Set                     0.164        0.399        0.421       100000
/pif_LongInt/UnsignedDouble/_SetBlock               0.195        0.202        0.228       250000
/pif_LongInt/UnsignedDouble/_GetBlock               0.084        0.085        0.092       100000
/pif_LongInt/UnsignedDouble/SetModeFlag             0.055        0.057        0.066        50000
/pif_LongInt/UnsignedDouble/New                     0.020        0.020        0.026        50002
/pif_LongInt/UnsignedDouble/Length                  0.005        0.006        0.017        50000

Divide(): 28,011 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/SquareTest                             0.109        0.840        0.840            1
/pif_LongInt/UnsignedDouble/Square               0.445        0.542        0.571        50000
/pif_LongInt/UnsignedDouble/Set                  0.072        0.192        0.183        50000
/pif_LongInt/UnsignedDouble/proc/_Process        0.119        0.120        0.129        50000
/pif_LongInt/UnsignedDouble/_SetBlock            0.095        0.099        0.118       100000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            1

Square(): 87,565 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/PowerTest                              0.130        4.268        4.268            1
/pif_LongInt/Power                               0.517        3.948        3.949        50000
/pif_LongInt/UnsignedDouble/Square               1.308        1.554        1.600       150000
/pif_LongInt/UnsignedDouble/proc/_Process        0.751        1.015        0.978       250000
/pif_LongInt/UnsignedDouble/Multiply             0.554        0.919        0.901        50000
/pif_LongInt/UnsignedDouble/New                  0.199        0.569        0.565       100001
/pif_LongInt/UnsignedDouble/Set                  0.151        0.537        0.549       100000
/pif_LongInt/UnsignedDouble/_SetBlock            0.341        0.351        0.429       400000
/pif_LongInt/UnsignedDouble/_GetBlock            0.226        0.232        0.246       300000
/pif_LongInt/UnsignedDouble/SetModeFlag          0.060        0.060        0.072        50000
/pif_LongInt/UnsignedDouble/Length               0.031        0.033        0.044       150000

Power(): 12,661 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/BitwiseAndTest                         0.156        0.926        0.927            1
/pif_LongInt/UnsignedDouble/proc/_Process        0.428        0.511        0.528       150000
/pif_LongInt/UnsignedDouble/Set                  0.164        0.405        0.418       100000
/pif_LongInt/UnsignedDouble/BitwiseAnd           0.100        0.375        0.376        50000
/pif_LongInt/UnsignedDouble/_GetBlock            0.069        0.070        0.080       100000
/pif_LongInt/UnsignedDouble/Length               0.009        0.011        0.019        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            2

BitwiseAnd(): 132,978 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/BitwiseOrTest                          0.155        0.912        0.912            1
/pif_LongInt/UnsignedDouble/proc/_Process        0.418        0.498        0.528       150000
/pif_LongInt/UnsignedDouble/Set                  0.155        0.406        0.416       100000
/pif_LongInt/UnsignedDouble/BitwiseOr            0.108        0.352        0.361        50000
/pif_LongInt/UnsignedDouble/_GetBlock            0.072        0.074        0.074       100000
/pif_LongInt/UnsignedDouble/Length               0.004        0.005        0.014        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            2

BitwiseOr(): 138,504 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/BitwiseXorTest                         0.153        0.905        0.906            1
/pif_LongInt/UnsignedDouble/proc/_Process        0.406        0.488        0.507       150000
/pif_LongInt/UnsignedDouble/Set                  0.149        0.387        0.399       100000
/pif_LongInt/UnsignedDouble/BitwiseXor           0.119        0.372        0.378        50000
/pif_LongInt/UnsignedDouble/_GetBlock            0.071        0.075        0.093       100000
/pif_LongInt/UnsignedDouble/Length               0.007        0.008        0.016        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            2

BitwiseXor(): 132,275 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/BitwiseNotTest                         0.078        0.320        0.320            1
/pif_LongInt/UnsignedDouble/Set                  0.082        0.211        0.198        50000
/pif_LongInt/UnsignedDouble/proc/_Process        0.129        0.131        0.126        50000
/pif_LongInt/UnsignedDouble/BitwiseNot           0.031        0.033        0.045        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            1

BitwiseNot(): 1,111,111 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/BitshiftLeftTest                       0.083        0.440        0.440            1
/pif_LongInt/UnsignedDouble/Set                  0.082        0.214        0.220        50000
/pif_LongInt/UnsignedDouble/BitshiftLeft         0.135        0.148        0.152        50000
/pif_LongInt/UnsignedDouble/proc/_Process        0.132        0.134        0.140        50000
/pif_LongInt/UnsignedDouble/BitLength            0.008        0.008        0.010        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            1

BitshiftLeft(): 328,947 operations/second

                                   Profile results (total time)
Proc Name                                          Self CPU    Total CPU    Real Time        Calls
----------------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/BitshiftLeftRotateTest                      0.094        0.440        0.440            1
/pif_LongInt/UnsignedDouble/Set                       0.082        0.198        0.226        50000
/pif_LongInt/UnsignedDouble/BitshiftLeftRotate        0.144        0.151        0.149        50000
/pif_LongInt/UnsignedDouble/proc/_Process             0.115        0.119        0.142        50000
/pif_LongInt/UnsignedDouble/BitLength                 0.005        0.005        0.012        50000
/pif_LongInt/UnsignedDouble/New                       0.000        0.000        0.000            1

BitshiftLeftRotate(): 335,570 operations/second

                                Profile results (total time)
Proc Name                                     Self CPU    Total CPU    Real Time        Calls
-----------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/BitshiftRightTest                      0.083        0.436        0.435            1
/pif_LongInt/UnsignedDouble/Set                  0.103        0.229        0.219        50000
/pif_LongInt/UnsignedDouble/BitshiftRight        0.123        0.126        0.139        50000
/pif_LongInt/UnsignedDouble/proc/_Process        0.124        0.128        0.126        50000
/pif_LongInt/UnsignedDouble/BitLength            0.003        0.004        0.006        50000
/pif_LongInt/UnsignedDouble/New                  0.000        0.000        0.000            1

BitshiftRight() 359,712 operations/second

                                   Profile results (total time)
Proc Name                                           Self CPU    Total CPU    Real Time        Calls
-----------------------------------------------    ---------    ---------    ---------    ---------
/mob/verb/BitshiftRightRotateTest                      0.089        0.457        0.458            1
/pif_LongInt/UnsignedDouble/Set                        0.080        0.192        0.184        50000
/pif_LongInt/UnsignedDouble/BitshiftRightRotate        0.173        0.179        0.180        50000
/pif_LongInt/UnsignedDouble/proc/_Process              0.110        0.111        0.108        50000
/pif_LongInt/UnsignedDouble/BitLength                  0.005        0.007        0.012        50000
/pif_LongInt/UnsignedDouble/New                        0.000        0.000        0.000            1

BitshiftRightRotate(): 277,777 operations/second