Are components really faster compared to templates?

I decided to compare the speed of components with ko 3.2 compared to other template engines, adding a component test to the following jsperf:

http://jsperf.com/knockout-template-engines/19

The results really baffle me, as I see components 98% faster than regular templates. I feel like I'm doing something wrong, but I can’t understand.

Can any expert shed light on this? Is this work real or am I seeing incorrect test results?

+7
knockout-components
source share
1 answer

It is hard to compare the performance of async with other templates, but I hacked a test example of the ko component (very ugly hack, sorry) to check that this is done on setInterval: http://jsperf.com/knockout-template-engines/21 to get representation. It seems that it is made in comparison with others.

An example in the real world shows that this is unlikely to be your performance bottleneck: https://metrics.wmflabs.org/static/public/dash/

+1
source share

All Articles