logoalt Hacker News

Pannoniae • today at 5:37 PM • 1 reply • view on HN

"We’d like to initialise our Vec in parallel, otherwise we’d have to wait for the main thread to fill the entire Vec with a placeholder value only to then have our threads overwrite those placeholder values."

Talk about overengineering :P Multithreaded vector initialisation instead of just...skipping it?


Replies

steveklabnik • today at 6:48 PM

That sentence is specifically talking about not initializing with a placeholder value, and instead letting it write over uninitialized values.