The beta split rule relies on the lgamma C function which may not be re-entrant. At the moment I guard against this but it makes literanger about 10x slower than ranger for this rule.
I think the simplest, most cross-platform solution, without introducing dependencies like Boost etc, would be to write a log gamma function that is re-entrant (can base this off of glibc's implementation of lgamma_r).
The beta split rule relies on the
lgamma
C function which may not be re-entrant. At the moment I guard against this but it makesliteranger
about 10x slower thanranger
for this rule.I think the simplest, most cross-platform solution, without introducing dependencies like Boost etc, would be to write a log gamma function that is re-entrant (can base this off of glibc's implementation of
lgamma_r
).