Comment

Comment by silisili

This is interesting, thanks.

> 0b11111110 - All 1s with a trailing 0, indicates heap allocated

> 0b11XXXXXX - Two leading 1s, indicates inline, with the trailing 6 bits used to store the length

I stared at this for too long, as it allows collision. Then I realized you'd never set the third bit, it should probably have been written 0b110XXXXX and recorded that 5 bits are used for length. Right or did I understand it wrong?

parent silisili 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton