Hacker News new | ask | show | jobs
by shantanubala 4972 days ago
Though I don't know of an article, this video from a while ago describes (at a high level) the "hidden classes" that represent prototypes. It was part of the original launch of Chrome about 4 years ago. Some of the related videos have more info, but basically V8 represents prototypes as classes that act as a cache for the properties, so the lookup of properties within the prototype becomes much faster than a lookup for an ordinary property of an object.

http://www.youtube.com/watch?v=hWhMKalEicY

EDIT - Your comment inspired me to do some additional Googling -- here's another (text-based) description that's a little clearer: https://developers.google.com/v8/design#prop_access

1 comments

Exactly what I was looking for!