Inverting [or rather: negating] a number: what's quickest?

That's not "inverting", it's "negating".

Inverting usually means dividing one by the number, 1/x.

For negating, you can use unary negation:

return -number;

If you are worried about performance, don't create a function for this, that might introduce some overheads (although the compiler's optimiser might find ways to remove those).