The math/big library has basic routines implemented in assembly for
most common architectures, with all the math written in Go atop those.

Rémy.

2017-07-22 17:39 GMT+02:00 Hugh S. Myers <hsmy...@gmail.com>:
> Is math/big pari based?
>
> On Sat, Jul 22, 2017 at 8:36 AM, Rémy Oudompheng <remyoudomph...@gmail.com>
> wrote:
>>
>> 2017-07-22 17:19 GMT+02:00 Rémy Oudompheng <remyoudomph...@gmail.com>:
>> > 2017-07-22 16:48 GMT+02:00 me <yout...@z505.com>:
>> >> How does GoLang compare to other languages for mathematics dealing with
>> >> really large numbers?
>> >>
>> >> Prefer the ability to work with 2GB sized strings as numbers (need much
>> >> bigger than int64)
>> >>
>> >> I see there is this:
>> >> https://golang.org/pkg/math/big/
>> >>
>> >> And probably some other github projects for math in go?
>> >>
>> >> Is Python and Mathematica better at handling super large numbers? Plain
>> >> C?
>> >> C++ ? Javascript?
>> >>
>> >> I need to start working with some massive numbers, but am unsure to
>> >> choose
>> >> Go - as I don't have experience in Go Mathematics units yet.
>> >>
>> >
>> > math/big is the standard package for big integer arithmetic in Go, and
>> > it is quite fast.
>> > For your huge numbers, it all depends on which operations you need to
>> > do.
>> > For example, the math/big package uses Karatsuba multiplication, which
>> > cannot handle 2GB numbers in a reasonable amount of time.
>> >
>> > I wrote a little module (github/remyoudompheng/bigfft) to play with
>> > FFT-based multiplication of huge integers, while maintaining
>> > interoperability with the math/big package.
>> >
>> > On my computer, it multiplies 1Gbit numbers (300MB strings when
>> > printed in base 10), in 24 seconds (the GMP library does it in 9.3
>> > seconds). I assume that it would multiply your 2GB strings (6 Gbit
>> > numbers) in about 2 minutes.
>> >
>> > You are welcome to try it.
>> >
>> > Regards,
>> > Rémy.
>>
>> The most annoying issue you might encounter is that if your 2GB
>> strings are numbers printed in base 10, the math/big will not be able
>> to parse them in a reasonable time using the standard method
>> (SetString).
>>
>> Rémy.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to golang-nuts+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to