Jay Conrod

jayconrod.com · Personal blog · on HN since 2011

Jay Conrod, a software engineer who writes about V8 internals, Go, Bazel, and programming, plus personal posts on leaving Google and burnout.

What HN saysCommenters cite his V8 tour posts on object representation and the Crankshaft compiler to explain JS engine optimization, and recommend his Bazel posts as an intro.
24HN people shared it
11linked it in comments
14stories submitted
717story points
10 months agolast shared
2011people per year2026

Most-shared posts

  1. 1
    A tour of v8 crankshaft the optimizing compiler
    6 people · first shared 2015
  2. 2
    A Tour of V8: Garbage Collection
    5 people · 3 points · first shared 2014 · discussion on HN
  3. 3
    A tour of V8: object representation (2013)
    2 people · 46 points · first shared 2016 · 15 comments on HN
  4. 4
    Leaving Google
    1 people · 462 points · first shared 2021 · 437 comments on HN
  5. 5
    Internals of Go's new fuzzing system
    1 people · 184 points · first shared 2022 · 58 comments on HN
  6. 6
    Goroutines: The concurrency model we wanted all along
    1 people · 4 points · first shared 2023 · discussion on HN
  7. 7
    Water simulation demo in WebGL (2012)
    1 people · 4 points · first shared 2019 · discussion on HN
  8. 8
    Burnout
    1 people · 4 points · first shared 2021 · discussion on HN
  9. 9
    Life of a Go Module
    1 people · 3 points · first shared 2021 · discussion on HN
  10. 10
    Integration tests are best tests
    1 people · 3 points · first shared 2026 · discussion on HN
  11. 11
    Tutorial: Function Interposition in Linux
    1 people · 2 points · first shared 2011 · discussion on HN
  12. 12
    Preserving comments when parsing and formatting code
    1 people · 1 points · first shared 2023 · discussion on HN
  13. 13
    A simple interpreter from scratch in Python (part 1)
    1 people · 1 points · first shared 2016 · discussion on HN
  14. 14
    Posts 37
    1 people · first shared 2016
  15. 15
    Bazel
    1 people · first shared 2024

What HN people wrote when they linked it

jwmerrill · 2014-12-14
> The professional educator dialect of English is not very approachable for the layman. I think Dan's blog is largely pitched at other professional educators. All professions develop their own technical vocabulary. As an analogy, I recently enjoyed an article about the implementation of the v8 garbage collector by Jay Conrod: http://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection Here's a sample paragraph: "Distinguishing pointers and data on the heap is the first problem any garbage collector needs to solve. The GC needs to follow pointers in order to discover live objects. Most garbage collection algorithms can migrate objects from one part of memory to another (to reduce fragmentation and increase locality), so we also need to be able to rewrite pointers without disturbing plain old data." I think the article is an excellent piece of technical writing, but it would also be reasonable to say "the professional compiler engineer dialect of English is not very approachable to the layman." That said, good communicators need to be able to change their presentation based on the audience, and it's too bad that the people at the meeting you mention couldn't find a common vocabulary. If you want to see something by the author of this post that is pitched at the layman, he made a very nice TedX presentation a few years ago: http://www.ted.com/talks/dan_meyer_math_curriculum_makeover?language=e…
dilyevsky · 2024-12-10
Jay Concord’s blog is pretty good intro: https://jayconrod.com/tags/bazel
fulafel · 2019-03-07
I think they do this on the JS side: http://www.jayconrod.com/posts/52/a-tour-of-v8-object-representation For example, an array can be specialized to hold just one datatype, or just a couple of fields, based on how it seems to be used, and then de-optimized later if the assumption is broken.
Chyzwar · 2017-06-15
Type information is used in JS engines to compile into native code. If type information is too vague or change you can have deoptimization[0] [0]http://jayconrod.com/posts/54/a-tour-of-v8-crankshaft-the-optimizing-c…
kibwen · 2016-07-19
Interesting to note that character-based optimizations in JS engines are somewhat common (though this article is a few years old): http://jayconrod.com/posts/54/a-tour-of-v8-crankshaft-the-optimizing-c…
lorenzhs · 2016-06-21
I can't make useful guesses about the V8 developers' reasoning, but I'd assume they considered several options and chose this one for a reason, concerning how much performance is at stake. I don't know about Crankshaft's inner workings, though, so I can't make qualified comments about it. Maybe something like http://jayconrod.com/posts/54/a-tour-of-v8-crankshaft-the-optimizing-c… can answer some of your questions?
grayrest · 2016-03-31
It'd be related to inlining a function since size is a common rule there. Some searching turns up this[1] article on crankshaft from three years ago, which lists the restrictions as ">600 source characters including whitespace or 196 AST nodes". [1] http://jayconrod.com/posts/54/a-tour-of-v8-crankshaft-the-optimizing-c…
jstimpfle · 2016-02-24
I've looked at yacc + bison a couple times and always turned away before even attempting to write parsers in them. It's ugly as hell and I figure sprinkling code is hard to understand and thus insecure. However, have you tried parser combinators? Parsec (a Haskell library) is really nice if it fits your grammar. Here is one guy who simulated that in Python, also very nice: http://jayconrod.com/posts/37/
bjourne · 2015-10-07
Sure, megamorphic code requires a JIT. But it's a trivial one so I don't count it. :) Essentially, if you have the expression: z = x + y If you statically can't know the types of x and y, you must do an expensive method lookup. You call some variant of the plus function if x and y are floats, another if they are strings or lists and so on. So a good runtime notes the types of x and y the first time the expression is evaluated and recompiles the expensive call to the general_add() function with, say if x and y are 32 bit ints, a quick add_32bit_ints() call. See here for a description of the V8 JIT: http://jayconrod.com/posts/54/a-tour-of-v8-crankshaft-the-optimizing-c… It appears to be just "a plain old compiler" with inlining of method lookups.
rurban · 2015-07-23
Oops, I mixed up the two phases. Marking is incremental (also in v8), and sweeping is parallelizable. http://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection gives a good overview of good GC techniques, championed in earlier lisps and functional languages.
nostrademons · 2015-10-12
No, V8 parses your Javascript source into an AST. From the AST, there are two paths it can take. The first step is the "full-codegen" compiler, which walks the AST directly and emits unoptimized native code: http://wingolog.org/archives/2011/07/05/v8-a-tale-of-two-compilers If a function is hot, then it gets promoted to V8's optimizing compiler, which is currently Crankshaft but will soon be replaced by Turbofan. This compiles the AST first into a high-level IR, Hydrogen, which is an architecture-independent SSA-like form vaguely reminiscent of LLVM. Then that's lowered into an architecture-dependent IR, Lithium, where register allocation and instruction scheduling is performed. http://jayconrod.com/posts/54/a-tour-of-v8-crankshaft-the-optimizing-c… If you read the bug for this that someone posted up-thread, the AST information is fully available when inlining in Hydrogen, but a patch to remove the character limit tanked one of their benchmarks. Also, they didn't preclude fixing it in Turbofan, only in Crankshaft, and that's largely because Crankshaft is on its way out. (I've played a little with the internals of V8, but am not an official developer. Also, one of my friends is the Bay Area TL for V8.)

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close