I’m not sure why you wrote this, but as you show yourself further in the article, when using ==
the compiler will call the static method DoggoId.equals_impl0(long p1, long p2)
, so there will be no boxing at all.
Furthermore, the R8 optimizer will be able to inline the trivial static method call so the code will end up as if we were using long
values directly.
That’s one of the the main use cases for inline classes: being able to compare them with actually zero extra cost compared to their wrapped type.
Edit: the blog post has been updated to fix this. Thanks for the quick update!