I try to optimize images but need to know if there is a difference between decrease in percentage like 100% to 50% or optimization software based on algorithm for formats JPG, PNG.

An example:
If this is optimization for website design, it can be used optimization software based on algorithm.
If there is only upload on eBay, you can used simply 50% from 100% quality.

Where can be found more information about a difference?