In theory, a native implementation of exists that doesn't throw an Error and immediately catch it might be ever-so-slightly faster. Not sure what the overhead of creating an Error object is... it can be "expensive" because it creates a stack trace - although I think most browsers compute the stack trace only if needed nowadays. Hmm.
Originally posted by @wmhilton in https://github.com/isomorphic-git/lightning-fs/issues/21#issuecomment-519230529