Home > Web Front-end > JS Tutorial > JQuery for and each performance comparison analysis_jquery

JQuery for and each performance comparison analysis_jquery

WBOY
Release: 2016-05-16 17:33:43
Original
1084 people have browsed it

Recently I have been working on performance optimization and encountered many detailed problems. Now I will record the problems encountered one by one and share them with everyone. No thanks for the nonsense. I will post the code directly.

Copy code The code is as follows:



Performance comparison between for and each


< /head>








Input difference:
for loop execution time: 1
Each loop execution time: 3
The two results directly illustrate the problem.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template