google-nativeclient

launch my installed application from chrome browser

时光总嘲笑我的痴心妄想 提交于 2019-11-27 07:29:00
问题 My requirement is to launch my installed application from chrome browser if it is installed on client machine, If not installed then I wanted to start download. What is best recommended solution for chrome? So fare i tried following used NPAPI, but due to deprecation of NPAPI by chrome I can't use. Checked PNacl and Pepper API both API not providing access to local file system to launch an application. They just port my C/C++ code in browser and run it in browser environment with sandbox

Why is my program so slow?

巧了我就是萌 提交于 2019-11-27 03:26:25
问题 Someone decided to do a quick test to see how native client compared to javascript in terms of speed. They did that by running 10 000 000 sqrt calculations and measuring the time it took. The result with javascript: 0.096 seconds, and with NaCl: 4.241 seconds... How can that be? Isn't speed one of the reasons to use NaCl in the first place? Or am i missing some compiler flags or something? Heres the code that was run: clock_t t = clock(); float result = 0; for(int i = 0; i < 10000000; ++i) {