Skip to content

Instantly share code, notes, and snippets.

@gsathya
Last active March 6, 2018 02:08
Show Gist options
  • Save gsathya/4955ec30842be57092d77d48d34997f4 to your computer and use it in GitHub Desktop.
Save gsathya/4955ec30842be57092d77d48d34997f4 to your computer and use it in GitHub Desktop.
➜ v8 (1f0419da93) ✗ python parse-mem.py
AST Node Count Total Size
VariableProxy 22049 529.2 kb
Literal 5635 90.176 kb
FunctionLiteral 968 77.52 kb
ObjectLiteral::Property 2430 58.344 kb
Assignment 1066 25.608 kb
ObjectLiteral 648 20.768 kb
Call 820 19.704 kb
ExpressionStatement 1191 19.072 kb
VariableDeclaration 789 18.96 kb
Property 762 18.312 kb
NewFunctionDeclaration 269 8.64 kb
Block 229 7.36 kb
ArrayLiteral 189 6.08 kb
BinaryOperation 190 4.584 kb
EmptyStatement 290 2.328 kb
NaryOperation 42 2.064 kb
CompareOperation 51 1.248 kb
UnaryOperation 75 1.216 kb
Conditional 33 1.088 kb
ReturnStatement 33 0.816 kb
NewNestedVariableDeclaration 24 0.8 kb
IfStatement 23 0.768 kb
ForInStatement 11 0.48 kb
RegExpLiteral 14 0.36 kb
CallNew 3 0.096 kb
CountOperation 2 0.048 kb
TryCatchStatement 0 0.04 kb
Throw 1 0.032 kb
total: 915.712 kb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment