jqwik-team / jqwik

Property-Based Testing on the JUnit Platform
http://jqwik.net
Eclipse Public License 2.0
576 stars 64 forks source link

Optimize BigIntegerGrower#toLong: use instanceof instead of catching ClassCastException #434

Closed vlsi closed 1 year ago

vlsi commented 1 year ago

Fixes https://github.com/jlink/jqwik/issues/433


I hereby agree to the terms of the jqwik Contributor Agreement.

jlink commented 1 year ago

@vlsi Thans for all your PRs. Will review them when I have more time at my hands, probably in the weekend. Could you please add the lines

---

I hereby agree to the terms of the [jqwik Contributor Agreement](https://github.com/jlink/jqwik/blob/master/CONTRIBUTING.md#jqwik-contributor-agreement).

to the description of the PRs. My favourite OSS person says it's making the licensing thing at least a tiny bit safer on the legal side.

vlsi commented 1 year ago

Technically speaking, it is included into GitHub terms of use, so anyone who uses GitHub agrees on the terms of the target project.

See https://twitter.com/beatngu1101/status/1508183736147402764

I am fine re-adding the line, however, I just wanted to remove all the irrelevant boilerplate from the description.

vlsi commented 1 year ago

CI improves a lot with this change:

Before:

        470.4sec, net.jqwik.engine.properties.shrinking.ShrinkableProperties > allShrinkingShrinksToSmallerValues
        471.3sec,    2 completed,   0 failed,   0 skipped, net.jqwik.engine.properties.shrinking.ShrinkableProperties
        545.1sec, 1759 completed,   0 failed,   0 skipped, Gradle Test Run :engine:test

After:

         23.1sec, net.jqwik.engine.properties.shrinking.ShrinkableProperties > allShrinkingShrinksToSmallerValues
        110.6sec, 1759 completed,   0 failed,   0 skipped, Gradle Test Run :engine:test