You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, bigint.jl only defines binary operations (+, *, etc.) on pairs of BigInt values, and uses promote_rule{T<:Integer}(::Type{BigInt}, ::Type{T}) = BigInt for mixed operations.
However, GMP provides special functions mpz_add_ui etcetera to perform binary operations on a BigInt and a Culong or Clong, which are presumably much more efficient than converting the Clong into a BigInt first and then performing the operations (though I haven't benchmarked them). We should exploit these.
The text was updated successfully, but these errors were encountered:
Currently,
bigint.jl
only defines binary operations (+
,*
, etc.) on pairs ofBigInt
values, and usespromote_rule{T<:Integer}(::Type{BigInt}, ::Type{T}) = BigInt
for mixed operations.However, GMP provides special functions
mpz_add_ui
etcetera to perform binary operations on aBigInt
and aCulong
orClong
, which are presumably much more efficient than converting theClong
into aBigInt
first and then performing the operations (though I haven't benchmarked them). We should exploit these.The text was updated successfully, but these errors were encountered: