Coder Social home page Coder Social logo

trellixvulnteam / v8-aotc_iarn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ispras/v8-aotc

0.0 0.0 0.0 86.27 MB

V8 ahead-of-time compilation project

License: Other

JavaScript 22.21% C++ 75.99% Python 1.56% C 0.03% CSS 0.01% Makefile 0.03% HTML 0.03% Shell 0.08% Lua 0.02% Scheme 0.02% Batchfile 0.01%

v8-aotc_iarn's Introduction

V8 JavaScript Engine with AOTC

This is a modified version of V8 JavaScript Engine. AOTC means "Ahead-Of-Time Compilation" and in this project it allows to save machine-dependent optimized Lithium IR of Crankshaft JIT compiler into a file. Saving is available through command line "d8" interface. Based on V8 version 3.31.

Building

V8 build instructions. Building process is the same, our implementation is only for x64 platform, basically build is done using "make x64.release" command.

New command line options for d8

option description
--save-code <file> Save Lithium IR into file
--load-code <file> Load Lithium IR from file
--saveload-edge Set other d8 options which may break something when using saved Lithium IR. For example, concurrent JIT and concurrent on-stack-replacement must be disabled.

This implementation supports only a single JavaScript source file.

Example

One of arewefastyet.com asm.js benchmarks

$ wget -q https://raw.githubusercontent.com/h4writer/arewefastyet/master/benchmarks/asmjs-apps/box2d.js
$ #three standard runs with different size
$ /usr/bin/time -f %U ./d8 --saveload-edge box2d.js -- 1
frame averages: 17.725 +- 42.323, range: 3.000 to 264.000 
0.68
$ /usr/bin/time -f %U ./d8 --saveload-edge box2d.js -- 2
frame averages: 6.347 +- 14.352, range: 3.000 to 178.000 
1.24
$ /usr/bin/time -f %U ./d8 --saveload-edge box2d.js -- 3
frame averages: 4.892 +- 10.184, range: 3.000 to 179.000 
1.98

Gaining up to ~0.2 second speedup using saved Lithium

$ #saving
$ /usr/bin/time -f %U ./d8 --saveload-edge --save-code box2d.lithium box2d.js -- 1
frame averages: 16.425 +- 32.401, range: 4.000 to 191.000 
0.69
$ #three runs with loading
$ /usr/bin/time -f %U ./d8 --saveload-edge --load-code box2d.lithium box2d.js -- 1
frame averages: 10.400 +- 13.926, range: 3.000 to 69.000 
0.43
$ /usr/bin/time -f %U ./d8 --saveload-edge --load-code box2d.lithium box2d.js -- 2
frame averages: 5.601 +- 7.078, range: 3.000 to 70.000 
1.08
$ /usr/bin/time -f %U ./d8 --saveload-edge --load-code box2d.lithium box2d.js -- 3
frame averages: 4.632 +- 5.095, range: 2.000 to 68.000 
1.82

Resources

v8-aotc_iarn's People

Contributors

a1ph avatar ajklein avatar arv avatar bmeurer avatar dannoc avatar dslomov avatar erikcorry avatar eush77 avatar georgneis avatar hannespayer avatar hashseed avatar isheludko avatar jacobbramley avatar jakobkummerow avatar jaro-sevcik avatar jeisinger avatar loislo avatar marjakh avatar mi-ac avatar mraleph avatar otherdaniel avatar ripsawridge avatar rmcilroy avatar rossberg avatar sigurdschneider avatar ulan avatar verwaest avatar weilianglin avatar wingo avatar yury-s avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.