Boost logo

Boost :

Subject: [boost] [GSoC 2019] cpp_int Improvement
From: Fenil Mehta (fenilgmehta_at_[hidden])
Date: 2019-02-19 18:32:33


Hi,

Integers with the capability to store large numbers has always been a
requirement in C++ which has successfully been implemented by
boost/multiprecision/cpp_int. Other languages such as Python and Java also
supports such integer datatypes.

I performed a speed test for C++ and python integers. While comparing speed
of cpp_int and python int, I noticed that even though C++ source program
was compiled with -O2 and -O3 flags, cpp_int was slow as compared for
python int for multiplication and left-shift operations. The time taken for
multiplication was:
1) cpp_int = 17.06 seconds
2) python int = 8.39 seconds

I used the attached files to perform the testing on Linux. The execution
time was measured using the time command.

I would like to optimize this library. Being a GSoC aspirant, I was looking
to pair up with a potential mentor in this domain who could guide me. Any
feedback would be appreciated.

Regards,
Fenil Mehta





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk