per.js Speed comparison vue.js
First of all, I would like to make a commitment, although I am the author of Per.js, but in this test I completely maintain the principle of fairness, not the test results have a little change.
Since Vue.js and per.js are so much more capable of testing all the functions, I tested 2 representative functions in this test, respectively: for and component.
At the same time, in order to avoid disputes, now I would like to briefly introduce the specific parameters:
- Test PC for MacBook Air 2015 13-inch model, Mac OS version number 10.11.6 (15G31)
- Test your browser for Google Chrome (52.0.2743.116 (64-bit)) and Firefox (61.0.2 (64-bit))
- Test Vue.js version is 2.5.17
- Test Per.js version 1.3
Now let's start testing for the for Directive: (Effect: The browser UL label output 20,000 data)
"The following is the Vue.js code"
<! DOCTYPE html>
execution time specific: tested, in the Chrome browser, the first Vue execution time is approximately 220ms, after each execution time between 160 to 202ms. In the Firefox browser, the first execution time is 213MS, after which the test time is between 158~182ms. Let's take a look at the execution time of per.js "The following is Per.js code"
<! DOCTYPE html>
Execution time specific: After testing, Per.js's first execution time in the Chrome browser is approximately 46.5ms, followed by the execution time between 38~41ms. In the Firefox browser, Per.js's first execution time is 39ms, followed by the execution time between 36~39ms.
Conclusion:
As a result, in Google Chrome, per.js in the "Use for instruction output 20,000 messages" test, the Vue.js speed is about 5 times times faster. In the Firefox browser, the per.js is about 4.5 times times faster than the vue.js.
Next, we'll test the registration and drawing of the component. The following code uses the component function to draw the component in the middle of 100 elements. "The following is the Vue.js code"
<! DOCTYPE html>
execution time details: tested, Desktop search engine , the first Vue execution time is approximately 67ms, then each execution time is between 51 and 70ms. In the Firefox browser, multi-meat plant , the first time the execution time is 106ms, The test time after each is between 78~87ms. Let's test the performance of the per.js. "The following is the Per.js code"
<! DOCTYPE html>
Execution time specific: It's amazing (including me) that Per.js's first execution time in Chrome was about 1.5ms, and then the execution time was between 1.2~1.4ms. In the Firefox browser, Per.js's first execution time is 2ms, followed by the execution time between 2~3ms.
Conclusion:
As a result, in Google Chrome, Per.js is about 45 times times faster than Vue.js in the "Registering components and rendering components in 100 elements" test. In the Firefox browser, the per.js is about 30 times times faster than the vue.js.
Per.js Speed Comparison Vue.js