Skip to content

Instantly share code, notes, and snippets.

@gdela
Last active October 1, 2023 12:18
Show Gist options
  • Save gdela/8dcb77d179e4cd543ceb92142351873c to your computer and use it in GitHub Desktop.
Save gdela/8dcb77d179e4cd543ceb92142351873c to your computer and use it in GitHub Desktop.
Benchmark (unscaledValue) Score Error Units
value_of 0 0.885 0.021 ns/op
ctor_having_big_integer 0 4.141 2.112 ns/op
ctor_creating_big_integer_from_long 0 4.010 0.850 ns/op
ctor_creating_big_integer_from_bytes 0 11.274 1.482 ns/op
ctor_having_string 0 14.536 6.909 ns/op
value_of 1 4.080 2.500 ns/op
ctor_having_big_integer 1 4.239 0.920 ns/op
ctor_creating_big_integer_from_long 1 4.586 0.925 ns/op
ctor_creating_big_integer_from_bytes 1 12.411 7.313 ns/op
ctor_having_string 1 16.720 2.102 ns/op
value_of 123456789 4.049 0.920 ns/op
ctor_having_big_integer 123456789 4.202 0.099 ns/op
ctor_creating_big_integer_from_long 123456789 10.814 4.594 ns/op
ctor_creating_big_integer_from_bytes 123456789 15.400 1.181 ns/op
ctor_having_string 123456789 30.481 2.653 ns/op
value_of Long.MAX_VALUE 4.135 1.173 ns/op
ctor_having_big_integer Long.MAX_VALUE 4.355 0.560 ns/op
ctor_creating_big_integer_from_long Long.MAX_VALUE 10.925 6.597 ns/op
ctor_creating_big_integer_from_bytes Long.MAX_VALUE 20.982 2.960 ns/op
ctor_having_string Long.MAX_VALUE 119.507 12.859 ns/op
value_of Long.MAX_VALUE+10 [impossible]
ctor_having_big_integer Long.MAX_VALUE+10 3.885 0.706 ns/op
ctor_creating_big_integer_from_long Long.MAX_VALUE+10 [impossible]
ctor_creating_big_integer_from_bytes Long.MAX_VALUE+10 24.740 13.161 ns/op
ctor_having_string Long.MAX_VALUE+10 119.263 15.868 ns/op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment