You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first activity that I did about the estimation of performance was to execute all the tests and calculate the average of the execution time. The N-API version of the addon was found to be about 2% faster.
To verify and reinforce this preliminary results I created a repo https://github.com/NickNaso/bcrypt-perf where I conducted some experiments about bcrypt performance.
At the end in the various situations the N-API version was faster than NAN version and the gain in percentage was between 0.8% - 4.19% and the gap is to high in the synchronous api.
Hi everyone,
today I want announce that I just finished my work on bcrypt module. In this thread I want recap all that I did to arrive at use the N-API version of the addon in production on my web application.
Execute all tests on local machine and once all of them passed successfully I created a PR and after the module passed all tests on CI my work was merged on the napi branch https://github.com/kelektiv/node.bcrypt.js/tree/napi
Until I attempt that mantainers publish the module on npm I conducted some experiments about performance of N-API version against the previous implemented with classical V8 API using NAN. All my works and results about that are on this repo https://github.com/NickNaso/bcrypt-perf. Substantially the N-API version is little faster in avarage 2% than the NAN version. On my tests I considered the execution time of the most common operations accomplished by bcrypt (password hashing and comparing password)
Start testing bcrypt on web application before on development environment and after on production. I created a repo that contains my work and use the fit reference on package.json of my application.
Use published n-api tagged version of bcrypt (bcrypt@n-api) in production on web application Lexgenda
Lexgenda is a web application where user after signup and signing a subscription can execute research over the judgments issued by italian courts, essentially it's a search engine.
Below I report some screenshots:
Activity
mhdawson commentedon Jan 3, 2018
Thanks for writing up that article, tweeted out here https://twitter.com/mhdawson1/status/948562156127055872. Can the rest of the team do the same or retweet if you have notalready.
Looks like you already have a good number of people who have read and 'clapped', good job :)
I'll be interested to hear a bit more about your perf experiments in the next N-API meeting.
NickNaso commentedon Jan 24, 2018
Hi everyone,
today I want announce that I just finished my work on bcrypt module. In this thread I want recap all that I did to arrive at use the N-API version of the addon in production on my web application.
Fork the original project https://github.com/kelektiv/node.bcrypt.js and refactor all the functions and methods with the API provided by the C++ Wrapper of N-API
Execute all tests on local machine and once all of them passed successfully I created a PR and after the module passed all tests on CI my work was merged on the napi branch https://github.com/kelektiv/node.bcrypt.js/tree/napi
Until I attempt that mantainers publish the module on npm I conducted some experiments about performance of N-API version against the previous implemented with classical V8 API using NAN. All my works and results about that are on this repo https://github.com/NickNaso/bcrypt-perf. Substantially the N-API version is little faster in avarage 2% than the NAN version. On my tests I considered the execution time of the most common operations accomplished by bcrypt (password hashing and comparing password)
Start testing bcrypt on web application before on development environment and after on production. I created a repo that contains my work and use the fit reference on package.json of my application.
Use published n-api tagged version of bcrypt (


bcrypt@n-api) in production on web application LexgendaLexgenda is a web application where user after signup and signing a subscription can execute research over the judgments issued by italian courts, essentially it's a search engine.
Below I report some screenshots:
mhdawson commentedon Jan 30, 2018
@NickNaso thanks for the good summary. Great work!
mhdawson commentedon Nov 15, 2021
This was a great FYI but I think it can now be closed. Closing, please let us know if you think that was not the right thing to do.