{"id":108,"date":"2016-03-18T17:49:03","date_gmt":"2016-03-18T12:19:03","guid":{"rendered":"http:\/\/madhurendra.com\/?p=108"},"modified":"2016-03-18T17:49:21","modified_gmt":"2016-03-18T12:19:21","slug":"nodejs-improving-performance-using-native-binding","status":"publish","type":"post","link":"https:\/\/madhurendra.com\/nodejs-improving-performance-using-native-binding\/","title":{"rendered":"NodeJs – Improving performance using native binding"},"content":{"rendered":"
This is known fact that javascript is really slow in terms of sync operations like multiplications, divisions etc. – Since nodejs is based on js – Node inherits the curse. Doesn’t matter how much you improve your algorithm but c++ will outperform if you are running a sophisticated algorithm but one can push through imprecation. But it is not – It is easy to build a native extension & compile in seconds https:\/\/medium.com\/@devlucky\/how-to-get-a-performance-boost-using-node-js-native-addons-fd3a24719c85#.3uzqa9r4w<\/a> this article does well in explaining basics. but if you want to dive deep check official documentation<\/a>.<\/p>\n
\nCheck http:\/\/benchmarksgame.alioth.debian.org\/u64\/compare.php?lang=v8&lang2=gpp<\/a> this article to cross check the fact. Nodejs is fast in some aspects. I love it \ud83d\ude1b<\/p>\n
\nNodejs is based on V8 (Most ports), v8 based on C++, You must be already aware of that you can use C++ in nodejs – But it seems complex. <\/p>\n