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

decimal64 performance

These tables indicate the performance of common 64-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.
  64-bit conversions
  Operation decDouble idfpl64   decNum
  Encoding to BCD (with exponent)
  16-digit finite
  39       n/s       481    
  BCD to encoding (with exponent)
  16-digit finite
  46       n/s       327    
  Encoding to string
  16-digit, with exponent
  84       242       133    
  Exact string to encoding (unrounded)
  16-digit, with exponent
  229       648       196    
  String to encoding (rounded)
  16-digit, rounded, with exponent
  266       747       548    
  Widen to 128-bit
  16-digit, with exponent
  30       51       209    
  int32 to encoding
  From most negative int
  39       13       199    
  Encoded integer to int32
  To most negative int32
  32       70       136    
  Encoding (any value) to int32
  16-digit, all-nines round, to uint32
  178       165       n/s    
  64-bit miscellaneous operations
  Operation decDouble idfpl64   decNum
  Class (classify datum)
  Negative small subnormal
  37       95       113    
  Copies (Abs/Negate/Sign)
  CopySign, copy needed
  25       16       338    
  Count significant digits
  Single digit
  24       n/s       122    
  Logical And/Or/Xor/Invert (digitwise)
  16-digit
  23       n/s       510    
  Shift/Rotate
  Rotate 15 digits
  154       n/s       583    
  64-bit computations
  Operation decDouble idfpl64   decNum
  Add (same-sign addition)
  16-digit, unaligned, rounded
  245       247       848    
  Subtract (different-signs addition)
  16-digit, unaligned, rounded, borrow
  288       251    
  Compare
  16-digit, unaligned, mismatch at end
  126       151       442    
  CompareTotal
  16-digit, unaligned, mismatch at end
  149       142       594    
  Divide
  16- by 16-digit (rounded)
  828       556       1576    
  FMA (fused multiply-add)
  16-digit, subtraction, rounded
  785       879       1683    
  LogB
  Negative result
  48       66       279    
  MaxNum/MinNum
  16-digit, unaligned, mismatch at end
  155       183       656    
  Multiply
  16×16-digit, round needed
  362       612       1305    
  Quantize
  16-digit, round all-nines
  112       196       422    
  ScaleB
  Underflow
  212       221       513    
  To integral value
  16-digit, round all-nines
  135       170       709    


[previous | contents | next]