Version 1 (modified by 8 years ago) ( diff ) | ,
---|
The State of JSC
- Moved from LLVM to B3/Air
- Transition is complete
- FTL Jit in 64-bit platforms
- Big Jetstream improvements
- Big Kraken improvements
- Moved from Tracing to Sampling profiler
- Performance is an order of magnitude better in Web Inspector
- 10-20x faster with the sampling profiler
- ES6 Feature Complete
- Block Scoping
- Generator Functions
- Current work
- ES6 Sample Bench
- Fast Generators
- Fast Map/Set
- gotten 20% faster
- Runs 2 different tests
- Takes geometric mean of tests
- Steady state
- Concurrent Garbage Collection
- Gonna mean pauses in JSC
- Pauses won’t be nearly as long
- Execute JS during GC
- There will be points where you pause the world but it won’t be in high milliseconds
- Working on WebAssembly
- It’s being implemented
- DOM JIT
- Creating an abstraction for the JSC for operations on the DOM
- Be aware of getter accessors of being compiled
- Integrating ES6 Modules in HTML
- <script type=“module”>
- Almost done ES2017
- Support everything buy async/await
- Patches on async/await
- ES6 Sample Bench
- Demo of command line:
./Tools/Scripts/run-jsc —release —sample ~/test.js
- Shows sampling rate
- and the hottest byte code samples
- The hash identifies the code blocks and just
- These tools would be nice for WebContent process
- Too difficult to use with the sample profiles
- Would be cool to add byte code information in inspector
- At a high level a Heat Map would be nice (being worked on)
- If it is in inspector, it can impact performance and throw off the profile
JSC_dumpDFGDisassembly=1 ./Tools/Scripts/run-jsc —release —sample ~/test.js
- How to async/await
- async func with await is a shorthand for promises
- await automatically wraps the given function in a Promise and returns the promise
- WebAssembly
- Work is underway
- There is a trapping semantic in WebAssembly
- Cant export a function that takes 64-bit integer
- Internally in WebAssembly you can handle 64-bit integers
- You have to check that the memory is in bounds, if not then you have to unwind the webassembly
- Does the exception flatten the webassembly?
- The plan is to have each WebAssembly frame visible
- You can have import and export in WebAssembly to call from WebAssembly to JS
- Developers would likely have WebAssembly that calls to a JS helper to modify DOM since you can’t modify the DOM from WebAssembly
- There is a lot of debate still happening
- You can use the JS GC for whatever language your using
- How fast is WebAssembly?
- Significantly faster for common cases of compiling C code
- WASM is quite slow compared to native codes
- WebAssembly has more info about how things work that allow for more optimizations
- Close to native performance
- How do I compile to WebAssembly?
- Compile through clang, that pass it to LLVM IR then pass it back to WebAssembly
- It will likely get easier as tools are created
Note:
See TracWiki
for help on using the wiki.