Getting a laser to destroy a missile requires about 100 kW of energy and a few tons of hardware to focus it.
Getting a laser to blind optical sensors requires a $10 Radio Shack gift card.
And potentially very profitable. Huge chunks of valuable metals floating around waiting to be mined.
I seem to recall reading that If there were a mass of gold ingots in low Earth orbit, it would not be economically feasible to send the Space Shuttle up to bring them back to Earth. You'd spend more on training, parts, maintenance and fuel than a cargo hold full of pure bullion could offset. If you had a factory in orbit to use the gold to some purpose, that might be different, but that's putting the cart before the horse.
Your code should be more efficient!