This is the fifty sixth part of the ILP series. For your convenience you can find other parts in the table of contents in Part 1 – Boolean algebra

Today we are going to benchmark factorization. First, let’s start with the code:

Depending on the size of solver representation (how many bits we use to perform multiplication) we have different number of available pairs. We multiply two primes, prepare constraints and then solve the model.

See results here

Generally, most pairs were solved in around 0.02 second. Even testing with bigger sizes and numbers doesn’t change results. So generally, this method is pretty stable for typical integer usage.