Currently, `BigInt`

is a wrapper around `java.lang.BigInteger`

.

The Spire library has a `SafeLong`

type with identical semantics, which specializes into two cases:

- an instance when the underlying number fits in a
`Long`

, - another instance that wraps
`BigInteger`

.

That would help tremendously the `BigInt`

performance profile when the underlying value is reasonable.

Spire is considering dropping `SafeLong`

in the future due to the induced triplication (`BigInteger`

, `BigInt`

, `SafeLong`

); however, the optimizations `SafeLong`

provide could be ported to the Scala standard library.

It seems that source and binary compatibility could be completely preserved.

Would that contribution be appreciated? What would be the criteria used to decide whether the PR is merged?