Decimal Performance, version 1.12
Copyright (c) IBM Corporation, 2009. All rights reserved. ©
Draft of 7 Apr 2009
[previous | contents]

decimal128 performance

These tables indicate the performance of common 128-bit operations. Please see the Introduction for explanation.

These measurements are on decNumber/decFloats version 3.56 and IDFPL version 1.0, measured 2007.10.11 and 2007.10.19 respectively.
  128-bit conversions
  Operation decQuad idfpl128   decNum
  Encoding to BCD (with exponent)
  34-digit finite
  53       n/s       460    
  BCD to encoding (with exponent)
  34-digit finite
  74       n/s       307    
  Encoding to string
  34-digit, with exponent
  183       629       239    
  Exact string to encoding (unrounded)
  34-digit, with exponent
  297       1331       597    
  String to encoding (rounded)
  34-digit, rounded, with exponent
  451       1680       956    
  Narrow to decimal64
  34-digit, all nines
  140       546       612    
  int32 to encoding
  From most negative int
  44       18       199    
  Encoded integer to int32
  To most negative int32
  32       87       156    
  Encoding (any value) to int32
  34-digit, all-nines round, to uint32
  241       435       n/s    
  128-bit miscellaneous operations
  Operation decQuad idfpl128   decNum
  Class (classify number)
  Negative small subnormal
  53       355       133    
  Copies (Abs/Negate/Sign)
  CopySign, copy needed
  27       33       380    
  Count significant digits
  Single digit
  27       n/s       138    
  Logical And/Or/Xor/Invert (digitwise)
  34-digit
  27       n/s       622    
  Shift/Rotate
  Rotate 33 digits
  222       n/s       812    
  128-bit computations
  Operation decQuad idfpl128   decNum
  Add (same-sign addition)
  34-digit, aligned
  433       672       1180    
  Subtract (different-signs addition)
  34-digit, unaligned, rounded, borrow
  457       689    
  Compare
  34-digit, unaligned, mismatch at end
  187       320       1125    
  CompareTotal
  34-digit, unaligned, mismatch at end
  238       293       778    
  Divide
  34- by 34-digit (rounded)
  2018       1961       3172    
  FMA (fused multiply-add)
  34-digit, subtraction, rounded
  1622       3903       2707    
  LogB
  Negative result
  58       138       299    
  MaxNum/MinNum
  34-digit, unaligned, mismatch at end
  241       312       857    
  Multiply
  34×34-digit, round needed
  821       2444       2235    
  Quantize
  34-digit, round all-nines
  209       581       670    
  ScaleB
  Underflow
  263       495       553    
  To integral value
  34-digit, round all-nines
  233       461       886    


[previous | contents]