Improve test.check ClojureScript's random number generator speed

Description

test.check's random number ClojureScript Implementation has a slow path in goog.math.Long's multiply method. The conditional checks (https://github.com/google/closure-library/blob/master/closure/goog/math/long.js#L683-L711) don't affect the correctness of the implementation. These conditionals instead add extra branching and allocation overhead.

This patch ports the goog.math.Long's multiply over to ClojureScript with the conditionals removed. My benchmarking (benchmark code here https://gist.github.com/spinningtopsofdoom/7fb7fbe4ae7de159922a79e6f3f3e730) saw around a 2X speedup of Long generation

I've ported of Google Closure Libraries test of the goog.math.Long multiply method to ClojureScript in this gist (https://gist.github.com/spinningtopsofdoom/e479bf6f3485cd85ba979b4e5562057a).

Environment

None

Status

Assignee

gfredericks

Reporter

Peter Schuck

Labels

Approval

None

Patch

Code

Priority

Minor