Faster equals implementation