• Stars
    star
    528
  • Rank 83,941 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Collect runtime type information 😻 of your JavaScript code.

Runtime Type Information

Collect runtime type information 😻 of your JavaScript code.

This is a demo how you could use V8's new type information feature.

V8 can now collect type information at runtime. V8 is Google’s open source JavaScript engine. Chrome, Node.js, and many other applications use V8. This type profiler is built into the engine, the information is not statically inferred.

The V8 inspector protocol provides access to the type information. Since the inspector is available in Node (see Node Documentation), it's easy to write modules that utilize type information. This repo is a very simple demo of this.

Image of Demo

Compare the runtime type information with your TypeScript or Flow annotations. Or use them to find bugs and performance issues.

For technical details on type profile implementation in V8, see https://chromium-review.googlesource.com/c/v8/v8/+/508588 and the Design Doc.

Demo based on @hashseed's demo for code coverage.

Installation

Run npm start, then open localhost:8080.

Note: currently needs Node master, TypeProfile is not in 9.4. You can build from source or download a nightly build.

More Repositories

1

six-speed

ES6 polyfill vs. feature performance tests
JavaScript
150
star
2

InteractiveShell

Build web apps for interactive command-line tools
HTML
27
star
3

javascript-vs-native-addon-prime-numbers

Speed up your Node.js App with Native Addons. What’s faster, C++ or JavaScript?
JavaScript
27
star
4

Presentations

24
star
5

AdventOfCode2018

https://adventofcode.com/
JavaScript
13
star
6

nodejs-hello-world

Hello World example
JavaScript
11
star
7

twitch

Code samples from twitch.tv/fhinkel
JavaScript
11
star
8

git-bisect-demo

Practice git-bisect.
JavaScript
10
star
9

PerformanceProfiling

Slides for Performance Profiling for V8
JavaScript
9
star
10

configs

Shell
5
star
11

JSEnginesExamples

Examples for JavaScript Engines Talk
JavaScript
4
star
12

beertopeer

Real-time, cross-border, multi-currency, and low-cost payments by leveraging existing crypto currency technologies
JavaScript
3
star
13

blog

TypeScript
2
star
14

V8AndNode

2
star
15

create-download-link

Create a link to download a text file.
JavaScript
2
star
16

PlantSimLab

Graphviz (DOT)
2
star
17

tryM2

Deprecated (Macaulay2 Interactive website)
HTML
2
star
18

Node.js-10

Node.js 10 workshop
JavaScript
1
star
19

fhinkel.github.io

HTML
1
star
20

concat2015

Slides for talk at Conc.at() 2015: Mobile web apps with "native app" features
CSS
1
star
21

SimLab

JavaScript
1
star
22

ConfigFiles

Bash config files
Shell
1
star
23

nextjs-blog

TypeScript
1
star
24

nextjs-starter

JavaScript
1
star
25

set-caret-position

Selection or full line of text if nothing selected.
JavaScript
1
star
26

ModernNodejsLegacy

JavaScript
1
star
27

control-compute-engine

JavaScript
1
star