Utility Library Performance Compared to Native Solutions : JavaScript as a Case Study

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: Modern software development often involves using third-party libraries to prevent re-inventing the wheel, however, it is not always certain that they are the best solution. Within web development using JavaScript, there has been some debate on whether or not popular utility libraries have become obsolete as the language and ECMA script have been updated throughout the years. This work aimed to study the performance of three of the most popular JavaScript libraries to give better insight into how using utility libraries can impact performance. To achieve this, several of the library functions were benchmarked against native JavaScript implementations within three different metrics, execution time, memory usage, and file size. These metrics were found by combining the methods of previous works and focusing on web application performance impact. In the end, there were no major performance impacts when using utility libraries in JavaScript, however, the libraries did add somewhat significant loading time in the form of increased file sizes. While it is unclear how the results in this study relate to general use cases, the results suggest that native solutions generally perform slightly faster and with less memory usage. There were, however, some exceptions with certain library functions outperforming the native solutions. The work also provides information about how benchmarking in JavaScript can be particularly tricky due to the garbage collector and the Just-In-Time compilation. Lastly, there were also some unexpected findings with JavaScript performance differences between browsers.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)