Re: [GHC] #1687: A faster (^)-function.

#1687: A faster (^)-function. -------------------------------------+------------------------------------- Reporter: moonlite@… | Owner: Type: bug | Status: new Priority: normal | Milestone: ⊥ Component: Prelude | Version: 6.6.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Runtime | Test Case: performance bug | Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by hvr): Replying to [comment:16 bgamari]:
hvr, what do you think about this? Perhaps integer_gmp could wrap `mpz_pow_ui`?
You may notice that I had actually `mpz_pow_ui` wrapped earlier for 0.5.1, see http://hackage.haskell.org/package/integer-gmp-0.5.1.0/docs/GHC-Integer- GMP-Internals.html#g:3 but I had to drop it again for `integer-gmp-1.0` because there's no easy way to predict how large the result will be. But I wanted to revisit this at some later point. It's possible to wrap `mpz_pow_ui` but it requires to have GMP allocate the buffer, and then copy it over into the final `ByteArray#`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/1687#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC