4 min read14 hours ago

Press enter or click to view image in full size

I like messing with new Java features. This time I tried combining value classes (JEP 401) with Protocol Buffers, not because I needed to, but because protobuf messages are a perfect playground for a lot of small, repeated objects and I wanted to see what happens if those objects could be value classes. JEP 401 is still preview/experimental, and the Valhalla early-access builds let you try it out.

This post is a short write-up of an experiment I did for fun: I wrote a **protoc** plugin that generates value-class-based protobuf messages. The repo/README with quick details is here.

*TL;DR: *value classes can improve memory layout

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help