The tradeoff of -pipe is that it uses more memory, but requires less disk space. I'm not sure offhand if it works with windows ports of gcc.
-O2 concerns optimisation of the generated code. Generally, it will result in longer compilation times (and, often, bigger executable files) but the resultant executable will run faster.
You might want to include a link to the gcc online documentation which is available for various versions of gcc
here.