3 research outputs found

    Interoperation between Miniboxing and Other Generics Translations

    Get PDF
    Generics allow programmers to design algorithms and data structures that operate in the same way regardless of the data used by abstracting over data types. Generics are useful as they improve the programmer’s productivity by raising the level of abstraction, which in turn leads to reducing code duplication and uniform interfaces. However, as data on the low-level comes in different shapes and sizes, it is not a trivial job of compiler to bridge the gap between the uniform interface and the non-uniform low level implementation. Different approaches are used for generics translation and all of them can be categorized either into homogeneous or heterogeneous group. The characteristic of homogeneous translations is that all different data representations are transformed into an identical representation and use the same low-level code for this purpose. In the heterogeneous translations, code is duplicated and adapted for each incompatible data type. From a programmer’s point of view, there should be no difference between a generic method or class compiled using some homogeneous or heterogeneous translation. Therefore, the programmer can combine different types of translations together on different parts of the code and the program has to be correct. But, as different generics translations are implemented in different ways, interoperation between them introduces noticeable slowdowns as values need to be converted to the foreign object’s desired representation, incurring significant performance losses. In this thesis, it will be explored why slowdowns happen when different translations interact together and proposed the ways how they can interoperate more efficiently. Proposed approaches are implemented and their effectiveness is presented by benchmarking the implementation

    Optimizing JavaScript Engines for Modern-day Workloads

    Get PDF
    In modern times, we have seen tremendous increase in popularity and usage of web-based applications. Applications such as presentation softwareand word processors, which were traditionally considered desktop applications are being ported to the web by compiling them to JavaScript. Since JavaScript is the de facto language of the web, JavaScript engine performance significantly affects the overall web application experience. JavaScript, initially intended solely as a client-side scripting language for web browsers, is now being used to implement server-side web applications (node.js) that traditionally have been written in languages like Java. Web application developers expect "C"-like performance out of their applications. Thus, there is a need to reevaluate the optimization strategies implemented in the modern day engines.Thesis statement: I propose that by using run-time and ahead-of-time profiling and type specialization techniques it is possible to improve the performance of JavaScript engines to cater to the needs of modern-day workloads.In this dissertation, we present an improved synergistic type specialization strategy for optimized JavaScript code execution, implemented on top of a research JavaScript engine called MuscalietJS. Our technique combines type feedback and type inference to reinforce and augment each other in a unique way. We then present a novel deoptimization strategy that enables type specialized code generation on top of typed, stack-based virtual machines like CLR. We also describe a server-side offline profiling technique to collect profile information for web application which helps client JavaScript engines (running in the browser) avoid deoptimizations and improve performance of the applications. Finally, we describe a technique to improve the performance of server-side JavaScript code by making use of intelligent profile caching and two new type stability heuristics
    corecore