better big O performance