boostorg / boostorg/multiprecision

Speed of division with remainder for cpp_int

Open
#537 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
265
Forks
128
Avg merge
4h 48m
Merged PRs (30d)
2

Description

In a geometric code I observe a slowdown of a factor 4, when I switch from the gmp to the cpp_int backend. In vtune I see that more than 35% of the time are spent [here](https://github.com/boostorg/multiprecision/blob/develop/include/boost/multiprecision/cpp_int/divide.hpp#L231). The [comment](https://github.com/boostorg/multiprecision/blob/develop/include/boost/multiprecision/cpp_int/divide.hpp#L48) at the signature leads me to the question if I am in the scenario where this function is not optimized. Is there a trivial fix? The comment seems to indicate that it is optimized for small numbers of limbs.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.