Comparison of the Javascript efficiency of various Javascript browsers it is reported from an article on "translated words" that the comparison of Javascript in various browsers. As a Javascript developer, I personally pay more attention to this matter. I still trust SunSpider in the test area, as the original article says, "It is a group of well-designed tests that are easy to run and comprehensive ".
The test content is as follows:
3d-purely JavaScript 3D rendering operations, but do not include the rendering part. It contains a large number of floating-point operations and Array Operations.
Access-array, access to object attributes and variables.
Bitops-bit operations, which are important for games, mathematical operations, and multiple types of encoding and decoding. It is also the only Integer Operation in JavaScript.
Controlflow-control flow structure (repetition, recursion, condition ). At present, it is mainly a recursive structure, but other structures are also included.
Crypto-the real encryption code, mainly bit operations and string operations.
Date-"date" Object performance.
Math-multiple mathematical operation types.
Regexp-regular expression.
String-string processing, including generating a giant "tagcloud" code, decompressing the compressed Javascript code, and so on.
In addition to the comparison above, the Statistical Chart below compares the performance of various browsers more intuitively.
Although the string generated by the test is almost impossible in most production cases, I am still quite vocal about the low running efficiency of IE. To exclude the weakest string operation of IE, I was surprised by the test of excluding strings. Firefox is not much faster than IE. As I was looking forward to the previous test of Firefox 3 beta, I hope it can run faster.
Safari is also a browser that I have been paying attention to. It is still very satisfied with the efficiency in this test. As for Opera, it can be seen that the author of the original article has also given it a very high rating. the title "The fastest browser in the world" seems to be exactly what it belongs.
To sum up, most browsers in China are dominated by IE, so according to the above tests, especially for Javascript, character string operations should especially consider its performance. I found that the running efficiency of Javascript Regular Expressions in IE is quite satisfactory. I will give priority to using regular expressions if I encounter the comparison of string operations in the future.
Finally, we recommend that you continue to read the original article link.