Comment

Comment by commandlinefan

I've gotten a lot of gains in this area in the past by just - not memcpy'ing. A good percentage of the time, somebody assumes that they need to copy something somewhere when in fact, the original never gets referenced. I can often get away with reading a buffer off the wire, inserting null terminators to turn bits of the buffer into proper C-style strings and just using them in-place.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton