NodeJS Bcrypt hashing & comparing takes 2-3 seconds on average. How to optimize it. Is there any alternative solution for password hashing with millisecond-level performance?
Please suggest modifications required in the code below:
bcrypt.hash(password, 15).then(hashedPassword => { }
bcrypt.compare(password, savedUser.password).then(doMatch => { }