Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chakra JS data structure documentation #306

Closed
nojvek opened this issue Feb 12, 2016 · 8 comments
Closed

Chakra JS data structure documentation #306

nojvek opened this issue Feb 12, 2016 · 8 comments

Comments

@nojvek
Copy link

nojvek commented Feb 12, 2016

It would be great if there was some documentation on how chakra implements the JS datastructures such as arrays and objects and what goes on in the JIT world.

@kunalspathak kunalspathak changed the title Chakra JS Datascrutures documentation Chakra JS data structure documentation Feb 17, 2016
@ianwjhalliday
Copy link
Collaborator

Agreed! A blog would be a great forum for this. I'm not committing to anything here, since it would definitely be pressure on resources, but I think this is something we should seriously consider.

@nojvek
Copy link
Author

nojvek commented Feb 24, 2016

I understand. Would it work if I interviewed the team and took some notes? May be turn it into a little gitbook or something. The value of this is when someone is working on performance sensitive javascript, its important to understand what is going on under the hood. e.g why is new Array(1000) a lot faster than a 100 array.push calls.

@digitalinfinity
Copy link
Contributor

We have some old blog posts and talks that are still somewhat relevant- are you thinking something along these lines?
https://blogs.msdn.microsoft.com/ie/2012/06/13/advances-in-javascript-performance-in-ie10-and-windows-8/
https://www.youtube.com/watch?v=OqnMmoF2GqM

@nojvek
Copy link
Author

nojvek commented Feb 24, 2016

Hi Hitesh,

That's still somewhat a high level overview. I was more interested in how a
JavaScript object is stored in memory? How do you ensure fast property
access? When do bailouts happen? What happens when more properties are
added to an object. How to make large hash maps efficient? . How does array
allocations work on .push? How do you ensure functions get inlined? How do
you profile chakra e.t.c

An example is I am writing a simple virtual Dom diffing library to achieve
fast speeds. How do I optimize my js for fast perf and efficient garbage
collection. To do that understanding what goes under the hood in js runtime
would be very valuable for any developer.

On Tuesday, February 23, 2016, Hitesh Kanwathirtha notifications@github.com
wrote:

We have some old blog posts and talks that are still somewhat relevant-
are you thinking something along these lines?

https://blogs.msdn.microsoft.com/ie/2012/06/13/advances-in-javascript-performance-in-ie10-and-windows-8/
https://www.youtube.com/watch?v=OqnMmoF2GqM


Reply to this email directly or view it on GitHub
#306 (comment)
.

@ngsankha
Copy link
Contributor

@abchatra has written some posts regarding this which provide some insight into JS engine internal data structures. You can find them at http://abchatra.github.io/

@abchatra
Copy link
Contributor

Let me know if you have any questions. I will be glad to help. Also if you are interested in particular topic do let me know.

@nojvek
Copy link
Author

nojvek commented Feb 25, 2016

Thanks Abhijit,

Thanks for the blogs. There's some great stuff there. Looking forward to
inline cache article.

This is the kind of technical stuff that I think is very interesting.

I'm personally interested to learn how arrays and object maps work. How is
their runtime and memory performance of different operations.

How functions get stored and called. When do they get inlined? How scope
inheritance is calculated?

Basically how can I write my JavaScript so it performs at the speed close
to something written in C++.

On Wednesday, February 24, 2016, Abhijith Chatra <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Let me know if you have any questions. I will be glad to help. Also if you
are interested in particular topic do let me know.


Reply to this email directly or view it on GitHub
#306 (comment)
.

@adrian-rt
Copy link

+1. I'd like to read more stuff about this too. That blog was great, too bad it had only 2 posts though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants