Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Inside V8 - A Javascript Virtual Machine (msdn.com)
25 points by nreece on May 11, 2009 | hide | past | favorite | 2 comments


I'm a little confused by how Google plans to go back and add further optimization steps. From what I gathered from the video, they skip any IR step, and compile the javascript source straight to machine code. Lars Bak said a couple of times that the amount of code they generate was enormous.

If they skip building an IR, does that mean they intend to optimize the javascript representation itself to get performance? I'm a novice here, so I'm confused about where would they do things like unrolling loops and inlining methods if not against the IR?


I haven't watched the video yet, but it's not that hard to do loop unrolling and inlining directly on the generated machine code.

It's tricky (but by no means impossible) to do this on arbitrary machine code, but in this case they control the code generator, so they can make guarantees about the structure, and if necessary they can keep track of information to make optimizing the machine code directly easier.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: