Computer and Modernization

Previous Articles     Next Articles

Implementation Analysis and Performance Optimization for JavaScript Array in Chrome V8

  

  1. Department of Business Intelligence of SAP Labs China, Shanghai 201203, China
  • Received:2014-07-28 Online:2014-11-03 Published:2014-11-05

Abstract: With the complexity of JavaScript applications increasing, performance issues of JavaScript become increasingly prominent, but to optimize the use of JavaScript array can improve program efficiency. This paper, by analyzing the characteristics of JavaScript arrays and reviewing the source code of Chrome V8 JavaScript engine, describes the implementation details for JavaScript array in V8, and focuses on the Fast Elements and Dictionary Elements array storage modes. It also gives the basic principles of performance optimization of JavaScript array and four examples to show how to analyze and optimize programs in practical applications.

Key words: V8, Chrome, JavaScript, array, performance, optimization

CLC Number: