Conversation
|
Good — Now let me assess the semantic differences:
The key concern I want to evaluate is the The change looks clean and correct. The optimization saves 8 bytes per LGTM |
kentonv
left a comment
There was a problem hiding this comment.
This makes the code less type-safe.
Harris recently implemented "niche value optimization" for kj::Maybe, which is basically a generalization of what you are doing here. By implementing MaybeTraits<v8::TracedReference<T>> you can apply this saving to all instances of kj::Maybe<v8::TracedReference<T>> across the codebase, without losing any safety. Want to do that instead?
|
@kentonv Nice! I'll update this PR. |
94849fb to
0b4dbe1
Compare
jasnell
left a comment
There was a problem hiding this comment.
MaybeTraits makes me happy.
No description provided.