T
T
Think With Your Head2015-09-22 23:56:59
JavaScript
Think With Your Head, 2015-09-22 23:56:59

Is there any research on how bad it is to use the universal selector in javascript/jquery?

Hello!

Are there any such studies?
Should I use it when writing a plugin or come up with something else?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Inchin ☢, 2015-09-23
@Vyad

The following two pieces of code do roughly the same thing:
That is, if there is a difference, then in the internal device for checking for selectors, but not in how many elements will be sorted.
-------------------------------------------------- ---
Test results for 12600 items |:
---------------------------------------- -------------
With this number of elements, the difference of 0.8ms is too small to refuse the universal selector. By the way, now there are such studies :)

A
Artem Spiridonov, 2015-09-23
@customtema

I doubt about research, but simple tests are easy to do yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question