It generally works even if the interface speeds aren't the same. Let's say you have a 1g copper interface and a 10g fiber interface bonded. With LACP, round-robin, or XOR load distribution, it works as if all the interfaces in the bond were the same speed as the slowest. You can get an aggregate throughput of 2g. Maybe a little more if your flows happen to be distributed such that the big flows get hashed to the 10g link, but that's down to luck.
With active/standby load distribution, you can get 10g, but if that link fails, suddenly it's limited to 1g, which probably isn't a suitable backup. Even this can be okay, if you're moving from an all-1g bond to an all-10g bond, for example.