Hi all,

For the longest part I’ve been doing normal Rust, and have gone through Jon’s latest video on the 1brc challenge and his brrr example.

This was great as a couple aspects “clicked” for me - the process of taking a raw pointer to bytes and converting them to primitive types by from_raw_parts or u64::from_ne_bytes etc.

His example resolves around the need to load data into memory (paged by the kernel of course). Hence it’s a read operation and he uses MADV to tells the system as such.

However I am struggling a wee bit with layout, even though I conceptually understand byte alignment (https://garden.christophertee.dev/blogs/Memory-Alignment-and-Layout/Part-1) in terms of coming up with a sma…

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