Changes between Version 8 and Version 10 of ReplacingGMPNotes/TheCurrentGMPImplementation


Ignore:
Timestamp:
Jan 6, 2007 7:51:04 PM (8 years ago)
Author:
p_tanski
Comment:

add clarification for GMP function allocation from GHC heap

Legend:

Unmodified
Added
Removed
Modified
  • ReplacingGMPNotes/TheCurrentGMPImplementation

    v8 v10  
    1818                                         size_t new_size); 
    1919}}} 
    20 These special allocation functions bring most GMP memory usage into the GHC heap but do not seem that efficient otherwise.  (I could be wrong --PDT.)  Allocation uses the internal `allocate()` interface, so no garbage collection is performed during a GMP operation.  Note that GMP operations may allocate more memory themselves.  The memory allocated is a simple array of words (`W_`), rounded up to a whole number. 
     20These special allocation functions bring most GMP memory usage into the GHC heap but do not seem that efficient otherwise.  (I could be wrong --PDT.)  Allocation uses the internal `allocate()` interface, so no garbage collection is performed during a GMP operation.  Note that GMP operations may use these functions to allocate more memory themselves, after being called from Haskell code.  The memory allocated is a simple array of words (`W_`), rounded up to a whole number. 
    2121 
    2222=== Special Functions === 
    2323 
    24 GHC adds its own functions for string conversion, least common multiple (lcm) and conversion to and from floating point (floats and doubles).  In particular, the GHC designers decided to perform their own operations for encoding a GMP number (really, the array of mp_limb_t) to floating point and doubles.  GMP provides functions for some of these operations: 
     24GHC adds its own functions for string conversion, least common multiple (lcm) and conversion to and from floating point (floats and doubles).  In particular, the GHC designers decided to perform their own operations for encoding a GMP number (really, the array of mp_limb_t) to floating point numbers (floats or doubles).  GMP provides functions for some of these operations: 
    2525 
    2626|| '''Operation''' || '''GMP function''' || '''Notes''' ||