opacity is an int
It's a float actually
As mentioned, invisible objects are not actually drawn at all, which is faster than using 0 opacity. The only reason you'd ever want to set 0 opacity instead of setting the object invisible is in case you are using a WebGL shader that changes the opacity so something is visible.